components icon indicating copy to clipboard operation
components copied to clipboard

bug(MatPaginator): Paginator seems like it's reinitialized with every page/data change

Open PanosMagic32 opened this issue 3 years ago • 0 comments
trafficstars

Is this a regression?

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

The previous version in which this bug was not present was

14.2.0

Description

I'm implementing the MatPaginator where I get a list of posts (both hardcoded & with API pagination implementation) but the paginator only shows the "next page" arrow, and everytime there are incoming data the paginator seems like it's reinitializing and neither of its elements displayes the correct values.

Reproduction

Steps to reproduce:

  1. Create a new Angular project
  2. Add Angular Material (with ng add command) & leave the default values
  3. Implement the mat-paginator functionality with any element of your choice & pass the necessary data to it (examples can be found here: https://material.angular.io/components/paginator/overview)
  4. Check the paginator's funcionality

Expected Behavior

Navigate to the appropriate page and retain the correct data.

Actual Behavior

The paginator only shows the "next page" arrow, and everytime there are incoming data the paginator seems like it's reinitializing and neither of its elements displayes the correct values.

Environment

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

PanosMagic32 avatar Sep 14 '22 10:09 PanosMagic32