Is your feature request related to a problem? Please describe.
Imagine I have a column with links to projects where you display the project name as the clickable text. It's not possible to sort this column because every link starts with a "<".
Same goes for localized numbers. The float 10,000.00 would be 10.000,00 in German. Gridjs will sort this as a string, therefore totally wrong.
Describe the solution you'd like
The old jQuery datatable package solves it by separating the value where you want to sort by and the display value. I think that could be a great solution. (not the way they do it, tough 😅)
Instead of having to implement a custom sorting algorithm, we could add a new attribute to this object called sortBy or sortValue. If this is set, it will be used to sort the column by.
Supplemantal: Not sure if it's really that easy... unless you add the data via the columns and not via the table-wide data attribute.
Describe alternatives you've considered
I tried to implement the custom sorting algorithm but it creates MUCH redundant code and bloats my tables for a very defaulty case.
Additional context
I'm a Python developer, so I unfortunately can't help with a PR. But the solution could be easy to implement and a huge improvement to your package.
Is your feature request related to a problem? Please describe.
Imagine I have a column with links to projects where you display the project name as the clickable text. It's not possible to sort this column because every link starts with a "<".
Same goes for localized numbers. The float
10,000.00
would be10.000,00
in German. Gridjs will sort this as a string, therefore totally wrong.Describe the solution you'd like
The old jQuery datatable package solves it by separating the value where you want to sort by and the display value. I think that could be a great solution. (not the way they do it, tough 😅)
Instead of having to implement a custom sorting algorithm, we could add a new attribute to this object called
sortBy
orsortValue
. If this is set, it will be used to sort the column by.Supplemantal: Not sure if it's really that easy... unless you add the data via the columns and not via the table-wide data attribute.
Describe alternatives you've considered
I tried to implement the custom sorting algorithm but it creates MUCH redundant code and bloats my tables for a very defaulty case.
Additional context
I'm a Python developer, so I unfortunately can't help with a PR. But the solution could be easy to implement and a huge improvement to your package.
Best
Ronny