react-components
react-components copied to clipboard
Paginated MainTable sorting only sorts the visible page
When using the MainTable component with sortable and pagination, only the visible rows are sorted, not the whole data set.
Perhaps this is intended behaviour, but we've had users complain that they expect the whole data set to be sorted so if we don't want to change the current behaviour, we need an option to enable sorting of the whole data set.
We came up with a useSortTableData hook to solve this. Probably worth upstreaming this into react-components now that you mention this issue.