_fnSortingClasses does not remove sort classes post-initialization

_fnSortingClasses does not remove sort classes post-initialization

null_d3vnull_d3v Posts: 6Questions: 0Answers: 0
edited September 2013 in Bug reports
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.

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    > if I dynamically update aoColumns bSortable properties

    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
This discussion has been closed.