Sorting resets paging should be an option
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior When sorting event is fired, the page is set back to first one.
Expected behavior When sorting event is fired, it should stay on current page.
Reproduction of the problem
- http://swimlane.github.io/ngx-datatable/#client-sorting
- Select page 4
- Sort by any column
What is the motivation / use case for changing the behavior? When you have server side Huge paging, and are, for example, on page 80 from 100- you do some sorting and ‘Bang’ you are back on page 1. After that you have to get back to page ~20 or 80 to get same results. Very annoying.
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] Up to date Chrome
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:8
Top Results From Across the Web
Should the pagination be reset when changing the order?
You can see that both filtering and sorting come before pagination. This means that whenever the order changes (sort), you should repaginate ...
Read more >[Resolved] Sorting resets when pagination is used - Toolset
Hello,. I just found out that the sorting that I have on my custom search resets every time I go to a new...
Read more >[Solved] ASP.Net GridView Filter resets on Sorting and Paging
I have a search for my GridView and I would like to use the Sort function of the GridView to sort my search...
Read more >Announcing changes to views pagination and sorting user ...
There will not be an explicit option for jumping to the last page. Changes to sorting user profile pages. Note: The changes described...
Read more >Sorting columns does not reset to first page - Telerik
Hello Tim, Basically such behavior is not supported. However you can try to use the dataSource requestStart event to check if the Grid...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
we need this feature as well. with server side paging , we expect to stay on the same page after sorting.
<ngx-datatable #tableRows (sort)=“onSort($event)” …
@ViewChild(‘tableRows’) table: any;
Try to add this in onSort() function: this.table.bodyComponent.updateOffsetY(this.page.offset); this.table.offset = this.page.offset;