Custom sorting (plug-in) doesn't save state?
Custom sorting (plug-in) doesn't save state?
I'm using the natural sort plugin for a particular column. It sorts fine - no problems there.
I'm also using stateSave and it saves the sorting state just fine. Except, for the column I'm sorting using the natural sort plugin.
I have analyzed the data in the localStorage and the stateSave is saving the column and its order. But the order applied upon table loading is not the one of the type of the column ('natural') but something else (seems numeric).
I couldn't find anything about this through the forums. I'm using 1.10.0-beta.2. Have tried the nightly and has the same behavior.
Is this a bug or am I doing something wrong?
I'm also using stateSave and it saves the sorting state just fine. Except, for the column I'm sorting using the natural sort plugin.
I have analyzed the data in the localStorage and the stateSave is saving the column and its order. But the order applied upon table loading is not the one of the type of the column ('natural') but something else (seems numeric).
I couldn't find anything about this through the forums. I'm using 1.10.0-beta.2. Have tried the nightly and has the same behavior.
Is this a bug or am I doing something wrong?
This discussion has been closed.
Replies
Allan
http://mentalstring.net/datatables/example0.html
- Default order: by the name column
- The test column uses the 'natural' type for sorting
- When changing the order of the name column, the state is saved and respected upon reloading
- When changing the order of the test column, upon reload, the sorting column is the correct one, the order (ascending) too, but the sorting seems to be done numerically, no with the 'natural' type.
Regards,
Allan
Regards,
Allan
While I have you, and speaking of the nightly, the build date for v1.10.0-beta.3.dev on https://next.datatables.net/download seems to be stuck on March 6th. The build itself seems to be up to date, just the date seems to be wrong.
Cheers!
Allan