Skip to content

bug(mat-checkbox): Animation issue with Indeterminate state #25289

Closed
@rafdewit

Description

@rafdewit

Description

When a checkbox is loaded with checked=true & indeterminate=false, the first time it changes to indeterminate=true the animation does not work properly. The checkbox visually goes to "empty/false" and then to the indeterminate state. Any further checked and indeterminate change after works properly with animations.

I've reproduced this on a checkbox-overview-example fork:
https://stackblitz.com/edit/angular-qtmlqq-t7otn9?file=src/app/checkbox-overview-example.ts

Reproduction

Steps to reproduce:

  1. https://stackblitz.com/edit/angular-qtmlqq-t7otn9?file=src/app/checkbox-overview-example.ts
  2. uncheck a subtask
  3. observe the parent task state change animation from checked=true to indeterminate=true

Expected Behavior

Animation between checked and indeterminate state on indeterminate state change true => false. (checked = true)

Actual Behavior

Animation bug: change indeterminate state does not animate properly the first time.

Environment

  • Angular: 14.0.0
  • CDK/Material: 14.0.5
  • Browser(s): Chrome
  • Operating System: Windows

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions