-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/chips
Description
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
14.2.6
Description
Having Reactive forms attached to mat-chip-grid
which accepts an array of object values, clears them on focus out.
Reproduction
Steps to reproduce:
- Create a formgroup with some formControl
- Bind it to
<mat-chip-grid>
- Add some new options (or the same works if the list is already populated) that are arrays of objects.
- Focus out of the component
Upon further investigation, figured that the core problem is that on focus out, object values are transformed to strings hence why we don't see the name property. Nevertheless objects were not transformed in v 14.
Note: In the Docs Chip list works as expected because it is not bound to Reactive forms
Expected Behavior
All options remain with previously defined object values
Actual Behavior
All options are transformed to strings thus we have empty text options
Environment
- Angular: 15.0.4
- CDK/Material: 15.0.3
- Browser(s): Chrome 108.0.5359.124
- Operating System: macOS Ventura 13.1
reimer-atb, posterhorn, moh2a, UrzaUrza, Rafael94 and 11 more
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/chips