Skip to content

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

Open
@mazhar-fis

Description

@mazhar-fis

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

On changing paginator's input property 'pageIndex', table content does not update.

Reproduction

Steps to reproduce:

  1. Create a table with paginator.
  2. Bind input property 'pageIndex' on paginator.
  3. increment the pageIndex property.
  4. Notice the table content. (Content remains on Page-1)
  5. Refresh the page.
  6. Click the next button of paginator.
  7. Notice the table content. (Content moves to Page-2)

Stackblitz: https://stackblitz.com/edit/angular-4h4jkr?file=src%2Fapp%2Ftable-overview-example.ts

Expected Behavior

When we use table with paginator and change page by:

  1. clicking next/previous button:
  • paginator state updates
  • table content updates
  1. Updating pageIndex property
  • paginator state updates
  • table content also should update

Actual Behavior

When we use table with paginator and change page by:

  1. clicking next/previous button:
  • paginator state updates
  • table content updates
  1. Updating pageIndex property
  • paginator state updates
  • table content does not update

Environment

  • Angular: 15.2.6
  • CDK/Material: 15.2.6
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/paginator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions