¿How to recover the default order?
¿How to recover the default order?
Description of problem:
Hello good night everyone,
I have a question that I cannot find an answer anywhere in this forum, so I open this thread.
I receive some data from an API in a certain order, then with datatable clicking on the row I can sort them in ascending and descending order.
Is there a way that I can return them as I received them from the ordered API? That is, click 1 orders ascending, click 2 orders descending and the last one leaves everything as we originally received it.
This question has an accepted answers - jump to answer
Answers
This plug-in can be used to restore the original sort order of the table. There isn’t an option for a third click on a column to restore yet though - there will be in DataTables 2. I don’t yet have a timeline for when that will ship though - when it is ready... .
Allan
Thanks for the quick reply @allan , and by modifying the current code would it be possible to have that feature? Because it is exactly the function that I would need and I can't find it anywhere.
Thanks for your time, mate
Not yet, I'm afraid, that feature hasn't been implemented - so it's just a case of waiting for DT2 as Allan said.
Colin