Column Sorting with Pagination

Hi, we are trying to use pagination with Handsontable. We were running into issues with filtering and column sorting. We were able to fix the filtering issue after following your example from a previous post: http://jsfiddle.net/handsoncode/g912eb3o/

However, we are still running into issues with column sorting - it only sorts the data that the page is on, and not the entire data set (including the data from the other pages).

Here is the demo that I am currently working on: https://stackblitz.com/edit/react-handsontable-test-collapse-vv7hcc?file=Table.js,index.js. Do you have any idea of how to implement a possible solution for this? I’ve tried a few things but nothing seems to work.

Thanks

Hi @nick

As we don’t have official support for pagination it’s a tricky topic and it depends on your implementation but generally the column sorting will work only for the currently showed data. You can read more about other user cases (and possible workarounds) here:

Hi Adrian,

Thanks. All the links in this issue are not working so this isn’t really that helpful. Has someone created a demo with working sorting and pagination?

Thanks,
Nick

Hi @nick

I’m sorry, I was sure that I’ve seen some suggestions in that issue but there isn’t really anything useful there. I’m afraid that at the moment it’s not possible to make it work.

Hi @nick

We just launched Handsontable v16.1.0, where you can test pagination.Here is the corresponding pull request https://github.com/handsontable/handsontable/pull/11612 with a lot of new API available.

In this guide, you can test it out https://handsontable.com/docs/react-data-grid/rows-pagination/.

At this link you will find the full list of changes https://handsontable.com/docs/react-data-grid/changelog/#_16-1-0

Within that version, we also added LTS support, Key-Value dropdown/autocomplete, and a Loading screen.