Skip to content

Conversation

crisbeto
Copy link
Member

mat-select has an internal check that doesn't re-assign a value if the reference is the same. This was meant primarily for primitives, but it ends up breaking the behavior for a multi-select where the value is always an array.

These changes skip the check for a multi-select receiving a new array value.

Fixes #21583.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Jan 19, 2021
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 19, 2021
@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Feb 2, 2021
…and re-assigned

`mat-select` has an internal check that doesn't re-assign a value if the reference is the same.
This was meant primarily for primitives, but it ends up breaking the behavior for a
multi-select where the value is always an array.

These changes skip the check for a multi-select receiving a new array value.

Fixes angular#21583.
@crisbeto crisbeto force-pushed the 21583/select-array-reassign branch from 5f565b6 to 4400550 Compare February 9, 2021 18:23
@mmalerba mmalerba merged commit cfbbbfe into angular:master Feb 10, 2021
mmalerba pushed a commit that referenced this pull request Feb 10, 2021
…and re-assigned (#21625)

`mat-select` has an internal check that doesn't re-assign a value if the reference is the same.
This was meant primarily for primitives, but it ends up breaking the behavior for a
multi-select where the value is always an array.

These changes skip the check for a multi-select receiving a new array value.

Fixes #21583.

(cherry picked from commit cfbbbfe)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(mat-select): FormControl change not reflected in display
3 participants