Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keeping sort info when doing remote paging #176

Open
eranlo opened this issue Aug 28, 2017 · 0 comments
Open

Keeping sort info when doing remote paging #176

eranlo opened this issue Aug 28, 2017 · 0 comments

Comments

@eranlo
Copy link

eranlo commented Aug 28, 2017

I'm trying to do remote sorting and paging on the server.

I may be missing something here, but when I use the pagingSource in the PAGER plugin, it seems like the function I pass is being called with the paging data, but without the sorting info. So, for example, if I sort my data by name alphabetically, the server gives me the first 20 results sorted by name. If I try to go to the next page, my function gets called with pageIndex of 1, but I have no context of what the last sorting info has been (sortParams is empty) so I can't pass it on to the server.

If, on the other hand, I click on the column header, the sortingSource function gets called with the sortParams, but it also has the latest paging info.

I tried to use a custom pager but couldn't figure out how to get access to the sort info. It looks like Column, which calls doSort has the pager state, but the page toolbar Button, that calls setPageIndexAsync does not have the sorting data.

Is there an example for passing the sort state to the paging call? It seems to me that this should be a pretty common use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant