⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Disabling list sorting on some pages only.



jgalak1

jgalak1
  • profile picture
  • Member

Posted 05 August 2020 - 17:33 PM

I have a GroceryCRUD-based application in which I need to turn off client-side sorting on one page only.  That one page needs to be sorted by the back end in a custom way, but most other pages need sorting capability.  I am using the datatables theme.

 

A temporary fix I tried was to turn off the ability of datatables to "remember" the sort order, by editing the file `public\assets\grocery_crud\themes\datatables\js\datatables.js` and changing `use_storage` to `false`.  On the custom sorted page this meant that even if a user re-sorted the page, the next time they loaded they'd get back the original, server-sorted list.  However, this has annoyed the users of other pages that relied on the page's ability to "remember" for their workflows.

 

So, any way to turn off client-side sorting on one page only? Or at least make it not "remember" the sorting order on that one page?

 

Thanks.