Skip to content

Fix(material/paginator): Table data does not get updated when paginat… #26903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

siqiluo7
Copy link

Fixes a bug in the Angular Material paginator component where table data does not get updated when paginator pageIndex is modified via Input. This is because pageEvent is not fired when pageIndex changes.

Fixes #26890

…or pageIndex is modified

Fixes a bug in the Angular Material `paginator` component where table data does not get updated when paginator pageIndex is modified via Input. This is because pageEvent is not fired when pageIndex changes.

Fixes angular#26890
@google-cla
Copy link

google-cla bot commented Apr 10, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@siqiluo7 siqiluo7 closed this Apr 10, 2023
@siqiluo7 siqiluo7 reopened this Apr 10, 2023
@srn271
Copy link

srn271 commented Nov 29, 2023

Hi. Could we get the changes soon?

The changes looking good for me.

@siqiluo7 siqiluo7 closed this Sep 3, 2024
@siqiluo7 siqiluo7 reopened this Sep 3, 2024
@siqiluo7 siqiluo7 requested a review from a team as a code owner September 3, 2024 18:47
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewseguin correct me if I'm wrong here, but I believe the intent of this event is that we only emit it when the user performs an action that changes the page, not when its programmatically set

@andrewseguin
Copy link
Contributor

That's right - the paginator should only emit events when the user changes something. Otherwise there's a weird paradigm where Input changes directly emit Output events, and Im not sure we do that anywhere.

Instead, we'll solve this with this change, which adds an API to the data source to let it know it should forcefully send data based on the latest state of the data/filter/paginator/sort: #30896

@andrewseguin andrewseguin self-assigned this Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(table): Table data does not get updated when paginator pageIndex is modified
4 participants