Paginator not working when Predicate Filter exists
hugop95 opened this issue · comments
Hello,
First, thank you for having created this great library. It is a straight improvement over the regular MatTable component on many levels, and shame on me for taking so long to discover it.
I have experienced a few issues with pagination however, here is the description. A stackblitz has been added as well.
What is the expected behavior?
The paginator should allow changing pages when clicking Next/Previous button
What is the current behavior?
After clicking the Next/Previous button, the page immediately goes back to the original one if a predicate filter has been set up.
What are the steps to reproduce?
Stackblitz:
https://stackblitz.com/edit/angular-gn5iad
Having no predicate filter linked to the table makes the paginator work normally. Adding any filter predicate makes the paginator stuck on the same page. Removing the filter predicate makes it work again.
Which versions of Angular, CDK, Material, NGrid, OS, TypeScript, browsers are affected?
- Windows 8 and 10
- Tested on Chrome and Firefox
- Bug exists for Angular 7 and 8 versions
- CDK v. 8.2.3
- Angular Material v.8.2.3
- Tested with ngrid 1.0.0-rec.16 (and 1.0.0-alpha.23 as well)
- Typescript 3.1.1
Is there anything else we should know?
There is also another bug related to the paginator: setting pageSizeOptions
with [5,10,15]
for example still launches the table by default with 10 displayed rows. A solution to that is to use paginator.perPage
after the table has been created to force the change.
Sorry, missed this one.
Will be fixed on the next release