_fnSortingClasses does not remove sort classes post-initialization
_fnSortingClasses does not remove sort classes post-initialization
null_d3v
Posts: 6Questions: 0Answers: 0
On an initialized DataTable, if I dynamically update aoColumns bSortable properties and then invoke _fnSortingClasses, the classing for previously sortable but now unsortable columns is not removed.
I believe the sort class removal logic should always remove all column sort classes regardless the state of the aoColumns bSortable property and then add the adequate sort classing as necessary.
That is, unless there is another way to remove the sort classing for rows marked as bSortable=false after _fnSortingClasses has been invoked during table initialization.
I believe the sort class removal logic should always remove all column sort classes regardless the state of the aoColumns bSortable property and then add the adequate sort classing as necessary.
That is, unless there is another way to remove the sort classing for rows marked as bSortable=false after _fnSortingClasses has been invoked during table initialization.
This discussion has been closed.
Replies
There is no documented public API to do that. You could use the information in the settings object, but that is not a public API and should never be written to - it is not designed to work that way!
> I believe the sort class removal logic should always remove all column sort classes
That would seriously hamper performance, particularly on large tables, and so I'm afraid is not an option. The sorting classes are already one of the slowest parts of DataTables!
There is no way of altering many of the config options without reinitialising the table at this time.
Allan