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(radio): radio-button should only emit change event if native input does. #911

Merged
merged 4 commits into from
Aug 8, 2016

Conversation

devversion
Copy link
Member

@devversion devversion commented Jul 23, 2016

  • The radio-button should only emit a change event, when the native input does.
    This ensures that the radio-button matches its behavior with the native radio buttons.
  • The button-toggle should only emit a change event, when the native input does.
    This ensures that the button-toggle matches its behavior with the native visual hidden input.
    Notice that the button-toggle sets the input type differently based on the type of the toggle.

Breaking Changes:

  • radio-button will no longer emit change event on de-select

    (Matches native behavior)
  • button-toggle will no longer emit change event on de-select when type is set to radio

    (Matches native behavior)

Fixes #791

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 23, 2016
@jelbourn
Copy link
Member

The changes look good, but we probably need to do the same thing to button-toggle. Do you want to do a pass on that as well?

@devversion
Copy link
Member Author

@jelbourn Done! Also added some tests for the change event on the button-toggle, because the behavior changes due different modes of the button-toggle.

@jelbourn
Copy link
Member

jelbourn commented Aug 8, 2016

@devversion LGTM, just needs rebase

…t does.

* The radio-button should only emit a change event, when the native input does.
  This ensures that the radio-button matches its behavior with the native radio buttons.

Breaking Change: radio-button will no longer emit change event on de-select.

Fixes angular#791
@devversion devversion force-pushed the fix/radio-match-native branch from 46f45e0 to 461ecc9 Compare August 8, 2016 22:13
@devversion
Copy link
Member Author

@jelbourn Done.

@jelbourn jelbourn merged commit 23a61ab into angular:master Aug 8, 2016
@devversion devversion deleted the fix/radio-match-native branch August 9, 2016 18:25
@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 Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Components should only fire a change event when they are focused
3 participants