Two-way binding support for "first" property of Table #6932
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-g488e6?file=src%2Fapp%2Fapp.component.ts
Current behavior
The original issue is that if you have a data set with e.g. 10 pages, you open page 10, and then the data set changes to 5 pages; you will see an empty list.
So I'm trying to reset the pager back to page 0 when the data changes.
The
first
property is used for that. However, two-way binding does not work, so it stays at 0 during paging. So, setting it to 0 does not trigger paging.The workaround is to set it to -1, and set it back to 0 in a setTimeout().
However, the fix should be that two-way binding to the
first
property works.Expected behavior
Two-way binding to the
first
property of the table component works.Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/github-g488e6?file=src%2Fapp%2Fapp.component.ts
Page through the data set. The first property should update.
When clicking the button, it will decrease the data set & revert back to page 0 using my hack.
Angular version: 7.0
PrimeNG version: 7.0
Browser: Chrome
The text was updated successfully, but these errors were encountered: