-
Notifications
You must be signed in to change notification settings - Fork 25.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(forms): correct usage of selectedOptions
#37620
fix(forms): correct usage of selectedOptions
#37620
Conversation
packages/forms/src/directives/select_multiple_control_value_accessor.ts
Outdated
Show resolved
Hide resolved
b101d36
to
b43c7ba
Compare
Previously, `registerOnChange` used `hasOwnProperty` to identify if the property is supported. However, this does not work as the `selectedOptions` property is an inherited property. This commit fixes this by verifying the property on the prototype instead. Closes angular#37433
b43c7ba
to
879d676
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing this @sonukapoor 👍
Also huge thanks to @alfaproject and @CaerusKaru for providing very useful feedback!
FYI, presubmit went well, marking this PR as ready for merge. Thank you. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Previously, `registerOnChange` used `hasOwnProperty` to identify if the property is supported. However, this does not work as the `selectedOptions` property is an inherited property. This commit fixes this by verifying the property on the prototype instead. Closes angular#37433 PR Close angular#37620
Previously,
registerOnChange
usedhasOwnProperty
to identify if theproperty is supported. However, this does not work as the
selectedOptions
property is an inherited property. This commit fixes this by verifying
the property on the prototype instead.
Closes #37433
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #37433
What is the new behavior?
Does this PR introduce a breaking change?
Other information