tablesorter icon indicating copy to clipboard operation
tablesorter copied to clipboard

Remembering sorting

Open atomAltera opened this issue 9 years ago • 2 comments

Hello, how can I get know what columns are sorted and apply the same sorting on next visit of page?

I'm tried to handle sortStart and sortEnd events but I did not found there which columns are sorted

atomAltera avatar Nov 21 '16 14:11 atomAltera

you've to save the user-choice somewhere, probably a cookie is the easiest and most compatible way. But this option should be optional as not everyone want to make cookies used for tablesorter perhaps.

DavidBruchmann avatar Nov 27 '16 10:11 DavidBruchmann

I use localStorage keys to set the sort order and on window.load retrieve https://www.w3schools.com/html/html5_webstorage.aspfor the sortList

enthuzy avatar Apr 25 '18 13:04 enthuzy