Server side sorting #3082
-
Is there a way to use a server for sorting, similar to pagination? E.g., instead of letting the framework sort one single page, you request a sorted result from the backend? I expected there to be something like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Figured it out myself. Here is a gist with an example: https://gist.github.com/philly-vanilly/a95f72684a01439160f67d5498bc3386 Many thanks to @junagao for the help: https://spectrum.chat/react-table/general/custom-sorting-manual-sorting-in-react-table~4b62ad3d-e562-42b8-9721-752dbe3ef5b3?m=MTU5OTA1MTU4NjgxOA== The only thing not working for you was that in your effect you had the regular fetch call coming directly after the fetch-with-sort. |
Beta Was this translation helpful? Give feedback.
Figured it out myself. Here is a gist with an example: https://gist.github.com/philly-vanilly/a95f72684a01439160f67d5498bc3386
Many thanks to @junagao for the help: https://spectrum.chat/react-table/general/custom-sorting-manual-sorting-in-react-table~4b62ad3d-e562-42b8-9721-752dbe3ef5b3?m=MTU5OTA1MTU4NjgxOA==
The only thing not working for you was that in your effect you had the regular fetch call coming directly after the fetch-with-sort.