Skip to content

bug(COMPONENT): Change Detection triggered on mat-table header cell hover #24806

Closed
@JeanMeche

Description

@JeanMeche

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

I'm having performance problems with a mat-table triggering change detections despite using OnPush.

When hovering the header cells, you will see the random number change.

Why would hovering on the table header trigger a change detection on the parent components ?

Reproduction

Here is a working example : https://stackblitz.com/edit/angular-bjouzc?file=src%2Fapp%2Fapp.component.ts

Expected Behavior

Hovering on the header cells should not trigger the change detection on OnPush parents.

Actual Behavior

A OnPush parent should not have its change detection triggered.

Environment

  • Angular: 13.3
  • CDK/Material 13.3:
  • Browser(s): Chrome 100

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