abp
abp copied to clipboard
Datatable fnSetColumnVis legacy method usage issue
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
I'm getting "tableInstance.fnSetColumnVis is not a function at hideColumnWithoutRedraw" error when there is only 1 rowAction item and its visibility is related to a permission check. If the user doesn't have that permission error occurs. I think root of the error is related to fnSetColumnVis legacy datatable method used in [datatables-extensions.js].(https://github.com/abpframework/abp/blob/6a810dbed50f8b8d9a8e0914f56825ac6922ef20/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js#L229).
Reproduction Steps
columnDefs: [
{
title: "",
rowAction: {
items:
[
{
text: 'Edit',
visible: function (data) {
return abp.auth.isGranted('Acme.Test.Edit')
},
action: function (data) {
editModal.open({ id: data.record.id });
}
},
]
}
},
{
title: 'Test',
data: "test"
}
]
Expected behavior
No response
Actual behavior
No response
Regression?
No response
Known Workarounds
No response
Version
8.3.1
User Interface
MVC
Database Provider
EF Core (Default)
Tiered or separate authentication server
None (Default)
Operation System
Windows (Default)
Other information
No response