How to specify the sort method for a column in a sortable table #3577
-
I've implemented table sorting as described in the documentation. The sort type defaults to sort by string. Other sort types are available. I'm seeking help on how to specify the sort method for a column. E.g. How do I add the
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Unfortunately, it's not possible to add attributes to tables, which is a limitation of the Attribute Lists extension:
You would need to provide your table as raw HTML in order to specify attributes. Other than that, you could also use JavaScript to add the class to the corresponding column before the table sort code is executed since table sort needs JavaScript anyway. |
Beta Was this translation helpful? Give feedback.
-
[Deleted as it did not add any value - issue came down to (probably buggy) tablesort behaviour] |
Beta Was this translation helpful? Give feedback.
Unfortunately, it's not possible to add attributes to tables, which is a limitation of the Attribute Lists extension:
You would need to provide your table as raw HTML in order to specify attributes. Other than that, you could also use JavaScript to add the class to the corresponding column before the table sort …