Skip to content
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

Conversation

@sonukapoor
Copy link
Contributor

@sonukapoor sonukapoor commented Jun 17, 2020

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 #37433

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #37433

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@ngbot ngbot bot added this to the needsTriage milestone Jun 17, 2020
@ngbot ngbot bot added this to the needsTriage milestone Jun 17, 2020
@sonukapoor sonukapoor force-pushed the select-multiple-ie-control-value-accessor branch 2 times, most recently from b101d36 to b43c7ba Jun 17, 2020
sonukapoor added 2 commits Jun 17, 2020
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
@sonukapoor sonukapoor force-pushed the select-multiple-ie-control-value-accessor branch from b43c7ba to 879d676 Jun 17, 2020
@sonukapoor sonukapoor marked this pull request as ready for review Jun 17, 2020
@pullapprove pullapprove bot requested a review from AndrewKushnir Jun 17, 2020
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

LGTM, thanks for fixing this @sonukapoor 👍

Also huge thanks to @alfaproject and @CaerusKaru for providing very useful feedback!

@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Jun 17, 2020

@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Jun 18, 2020

FYI, presubmit went well, marking this PR as ready for merge. Thank you.

AndrewKushnir added a commit that referenced this issue Jun 25, 2020
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 #37433

PR Close #37620
@sonukapoor sonukapoor deleted the select-multiple-ie-control-value-accessor branch Jun 25, 2020
@sonukapoor sonukapoor restored the select-multiple-ie-control-value-accessor branch Jun 25, 2020
@sonukapoor sonukapoor deleted the select-multiple-ie-control-value-accessor branch Jun 25, 2020
@sonukapoor sonukapoor restored the select-multiple-ie-control-value-accessor branch Jun 25, 2020
@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Jul 26, 2020

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 Jul 26, 2020
profanis added a commit to profanis/angular that referenced this issue Sep 5, 2020
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants