Skip to content

bug(mat-chip-grid): mat-form-field disabled state doesn't get updated when setting [disabled]=false on the mat-chip-grid element #30017

Closed
@Raphyyy

Description

@Raphyyy

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

The mat-form-field element wrapping mat-chip-grid appears to not catch the disabled state change from the mat-chip-grid element.
If you init the mat-chip-grid element with [disabled]=true then later you turn it off to false, the element still appears disabled. You need to click on it for it so it doesn't appears disabled anymore.

Reproduction

StackBlitz link: https://stackblitz.com/edit/gmyir1
Steps to reproduce:

  1. Wait one second
  2. Despite the setTimeout(() => { this.disabled = false; }, 1000); the element still appears disabled
  3. Click on it so it doesn't appears disabled anymore

Expected Behavior

The mat-form-field shouldn't appears disabled if the mat-chip-grid isn't.

Actual Behavior

The mat-form-field appears disabled no matter what if mat-chip-grid.disabled is set to true on init.

Environment

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

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions