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
In the case of a server-paginated list we get a pre-sorted list of results from the server. The user can click column headers to select sorting by field and change direction. However, the client-side sorting can conflict with the server-side sorting. It would be helpful if we had a way to disable the actual reordering of client-side sorting for these cases. In these scenarios we handle all sorting on the back-end and any client-side sorting is either redundant or a source of bugs.
If we disable sorting, the UI for sorting is not available and we would have to recreate something to do the same thing.
For this reason we use maxColumnSort with a positive value. This works most of the time, but we are surprised when the results seem out of order and have to resorted to hacks like using a modified value.
Alternative 2 - Custom "sort"
A workaround is to set column sorting to something like customSort: () => 0 to effectively make sorting avoid making any changes.
A few problems with this:
Only works for an individual column, so have to apply on multiple columns to avoid bugs.
We are still sorting, but mitigating the effect. Would be nice to avoid client-side sorting altogether.
The text was updated successfully, but these errors were encountered:
In the case of a server-paginated list we get a pre-sorted list of results from the server. The user can click column headers to select sorting by field and change direction. However, the client-side sorting can conflict with the server-side sorting. It would be helpful if we had a way to disable the actual reordering of client-side sorting for these cases. In these scenarios we handle all sorting on the back-end and any client-side sorting is either redundant or a source of bugs.
Code sandbox example
Alternative 1 - Disable sorting
If we disable sorting, the UI for sorting is not available and we would have to recreate something to do the same thing.
For this reason we use
maxColumnSort
with a positive value. This works most of the time, but we are surprised when the results seem out of order and have to resorted to hacks like using a modified value.Alternative 2 - Custom "sort"
A workaround is to set column sorting to something like
customSort: () => 0
to effectively make sorting avoid making any changes.A few problems with this:
The text was updated successfully, but these errors were encountered: