primeng
primeng copied to clipboard
Pagination not reseting when using multiple sortMode
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior
When using Datatable with sortMode: 'multiple', resetPageOnSort gets ignored. After sorting a column, the pagination stays on the same page.
Expected behavior Sorting a column resets the pagination.
Minimal reproduction of the problem with instructions https://stackblitz.com/edit/angular-yg9jqo
- Angular version: 6.X
- PrimeNG version: 6.X
I am seeing the same behavior.
In sortSingle()
if(this.sortField && this.sortOrder) {
if (this.restoringSort)
this.restoringSort = false;
else if(this.resetPageOnSort)
this.first = 0;
In sortMultiple() there is no reference to this.resetPageOnSort