Skip to content

bug(MatTabGroup): Pagination for tabs isn't properly re-initialized when underlying tab contents gets changed #21945

@nakhodkin

Description

@nakhodkin

Reproduction

Use StackBlitz to reproduce your issue:

Steps to reproduce:

  1. Navigate to https://stackblitz.com/edit/angular-xucgvn
  2. Select the "Sixth" or "Seventh" tab
  3. Put the tick next to "Switch between pages" which causes the contents within the MatTabGroup component to change.

Expected Behavior

What behavior were you expecting to see?
I do expect that pagination-related chevrons won't appear in case if tab contents dynamically get reduced from greater to lesser like in the provided case.

Actual Behavior

What behavior did you actually see?
material
I see that the tab pagination block is rendered with pagination controls

Environment

  • Angular: "^11.0.0"
  • CDK/Material: "^11.0.0"
  • Browser(s): Google Chrome Version 90.0.4417.0 (Official Build) canary (x86_64), Firefox 86.0b9
  • Operating System (e.g. Windows, macOS, Ubuntu): OS X 11.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions