Possibility for non-boolean sorting values #5369
Unanswered
bencergazda
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Most often we are doing server-side sorting (
manualSorting: true
), with managing the sorting state in the table withcolumn.toggleSorting()
. However, we have more complex sorting scenarios, that can't be described with adesc: true/false
value (which is only available currently in the ColumnSort interface).For now we are using a workaround, instead of calling
toggleSorting()
with a boolean value, we call it with a string, that describes the sorting strategy for the API. This works becausetoggleSorting
can save "anything" to the state, but is quite ugly and also causes a lot of TS errors that we need to handle.Do you think it would be possible to have a similar approach here as for the column filters, where any arbitrary data can be stored in the columnFilters state, in order to avoid the many TS workarounds?
Beta Was this translation helpful? Give feedback.
All reactions