Replies: 2 comments
-
Actually figured it out myself. Have data with a natural order field like function clearSort() {
handler.sort("id")
handler.clearSort();
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
indeed: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm just getting started with svelte and this datatables package and working my way through the tutorials (e.g. https://vincjo.fr/datatables/tutorial/sort-data).
It's not really clear to me how to "reverse" the sorting of a table besides doing a reload of the page. I did find the
DataHandler.clearSort
method, but it's not doing anything beside clearing the sorted property. This allows me to make the indicators look like the table is unsorted but in truth it just keeps the last sorting.My guess is that the original sorting is just not stored so it can't be reversed. But I wanted to ask if that's truly the case and if there is a way to work around it (besides reloading the page). Thanks!
Beta Was this translation helpful? Give feedback.
All reactions