Is there a way to change the logic of the Datatable's sorting mechanismon the columns? If so, how can I achieve it?
We would like to move empty fields to the bottom of the sorting both in ascending and in descending order.
Example elements: "aaa", "", "ccc", "bbb", ""
Current result (ascending): "","","aaa","bbb","ccc" (Descending works fine)
Desired result (ascending): "aaa", "bbb", "ccc", "", ""
Desired result (descending): "ccc", "bbb", "aaa", "",""
Thank you for the help.
Change DataTable sorting logic
-
- Posts: 560
- Joined: 23 Oct 2020, 09:28
This is JavaScript standard. Please check https://developer.mozilla.org/en-US/doc ... Array/sort
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests