You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able to specify a sort order, so that I can have a column that is only sortable by asc or false (unsorted)
A potential interface for this (in the column def) might be
in the first suggestion, an array is provided with the SortDirections. Toggling the sort of a column via column.toggleSorting invokes column.getNextSortingOrder(), which would internally reference the provided columndef sortOrder, and select the next item in the array. When the end of the array is reached, the next toggle would set the sort to false unless the enableSortingRemoval is false, in which case it would loop back around to the beginning of the array.
In the second suggestion, the column can be defined with an optional function that takes the current column.getIsSorted() value as a param, and returns the next sorting state. Nothing fancy, but it would allow for the column def to directly affect the toggled sort value. I could define my function as
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to be able to specify a sort order, so that I can have a column that is only sortable by
asc
orfalse
(unsorted)A potential interface for this (in the column def) might be
or potentially
in the first suggestion, an array is provided with the SortDirections. Toggling the sort of a column via
column.toggleSorting
invokescolumn.getNextSortingOrder()
, which would internally reference the provided columndefsortOrder
, and select the next item in the array. When the end of the array is reached, the next toggle would set the sort tofalse
unless theenableSortingRemoval
is false, in which case it would loop back around to the beginning of the array.In the second suggestion, the column can be defined with an optional function that takes the current
column.getIsSorted()
value as a param, and returns the next sorting state. Nothing fancy, but it would allow for the column def to directly affect the toggled sort value. I could define my function aswhich would effectively prevent the column from ever being sorted as "desc"
Other ways would also be great, such as booleans for
enableSortingDesc
orenableSortingAsc
(to follow the semantics ofenableSortingRemoval
).Beta Was this translation helpful? Give feedback.
All reactions