Open devany1 opened 6 years ago
I believe to be having this problem now in Angular 10.
So it appears to be happening only when the page it is manually being set back to is the same page the user is navigating from.
For example, let's say I want the table to always navigate to page 5 when the user uses the arrow buttons in the footer. When starting on page 1, if I use the right arrow, it sends the table to page 5. This works correctly. Now the problem comes when trying to navigate away from page 5. When I click the arrow to navigate to the last page of the table, it navigates to the last page instead of staying on page 5. When navigating to the last page from any other page than page 5, it navigates to page 5.
I'm submitting a ... (check one with "x")
Current behavior Table footer page number is not resetting after setting the offset
Expected behavior Table footer page number should change after setting the offset
Reproduction of the problem I have implemented the server side paging and sorting in my application. following is the sample markup of my table <ngx-datatable
lntable
I have imported the datatable component in my component class as follows
import { DatatableComponent } from '@swimlane/ngx-datatable/src/components/datatable.component';
@ViewChild('lntable') lntable: DatatableComponent;
If the user try to go to another page by clicking on the page number in footer. I am asking a confirmation in the setPage method as follows
}
if user cancel the confirmation, I am setting the offset but on the UI, footer page number shows the clicked page as highlighted.
What is the motivation / use case for changing the behavior? Table footer page number should reset after setting the offset
Please tell us about your environment: Windows
Table version: 9.3.x
Angular version: 4.x.x
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 ]
Language: [all | TypeScript 2.2.x | ES6/7 | ES5]