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(checkbox): Emit event when checkbox's indeterminate value changes #2130

Merged
merged 3 commits into from
Jan 18, 2017

Conversation

tinayuangao
Copy link
Contributor

Fixes #2004

R: @jelbourn

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 9, 2016
@jelbourn jelbourn self-requested a review December 9, 2016 21:50
@@ -203,6 +209,7 @@ export class MdCheckbox implements ControlValueAccessor {
this._transitionCheckState(
this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);
}
this.indeterminateChange.emit(this._indeterminate);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this event only fire when the value changes?

@@ -138,6 +138,9 @@ export class MdCheckbox implements ControlValueAccessor {
/** Event emitted when the checkbox's `checked` value changes. */
@Output() change: EventEmitter<MdCheckboxChange> = new EventEmitter<MdCheckboxChange>();

/** Event emitted when the checkbox's `indeterminate` value changes. */
@Output() indeterminateChange: EventEmitter<Boolean> = new EventEmitter<Boolean>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boolean lower-case

@tinayuangao tinayuangao force-pushed the fix-checkbox branch 2 times, most recently from 35ad57a to 7aea87d Compare January 17, 2017 19:19
@tinayuangao
Copy link
Contributor Author

Comments addressed. Please take another look. Thanks!

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jan 17, 2017
@mmalerba mmalerba merged commit f11c5eb into angular:master Jan 18, 2017
kara pushed a commit to kara/material2 that referenced this pull request Jan 20, 2017
…angular#2130)

* Emit event when checkbox indeterminate value changes

* Add test

* Use boolean and emit indeterminate only if value changed
@djanesch
Copy link

djanesch commented Mar 9, 2018

when will this change released?
@tinayuangao @jelbourn

@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 8, 2019
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[md-checkbox] checked and indeterminate state problem.
5 participants