Skip to content

Performance issue when using many mat-button-toggle-group components #17252

Closed
@Alin764

Description

@Alin764

Reproduction

https://stackblitz.com/edit/angular-cacnzk

I have a HTML table containing 250 rows
Each row has a mat-button-toggle-group with 5 options + another two mat-select components

When I toggle a button in the first rows of the table I’m having a significant delay. The delay is decreasing if move to the bottom of the page

Also, If I change from mat-button-toggle-group to mat-radio-group I don’t have these performance issue.

Steps to reproduce:

  1. toggle a button in the first row of the table
  2. toggle a button the last row of the table
  3. comment mat-button-toggle-group tag and enable mat-radio-group tag
  4. repeat steps 1 and 2 ( there is no delay when using mat-radio-group )

Expected Behavior

Similar performance as mat-radio-group

Actual Behavior

There is significant delay when using mat-button-toggle-group instead of mat-radio-group

Environment

  • Angular: 8.0.0
  • CDK/Material: 8.2.1
  • Browser(s): Chrome Version 77.0.3865.90 (Official Build)
  • Operating System: Windows

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions