-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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): model should update before change event is fired #456
fix(radio): model should update before change event is fired #456
Conversation
/** Change event subscription set up by registerOnChange (ControlValueAccessor). */ | ||
private _changeSubscription: {unsubscribe: () => any} = null; | ||
/** The method to be called in order to update ngModel */ | ||
private _onChangeHandler: (value: number) => void = (value) => {}; |
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.
number
?
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.
What do you think of renaming this to _controlValueAccessorChangeFn
? (similar for the touch one as well)
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.
- I have no idea where
number
came from. - I'm for the rename - I was going to ask you to rename this for me since I had no idea what to call it.
@jelbourn rebased |
@@ -273,6 +273,50 @@ describe('MdRadio', () => { | |||
})); | |||
}); | |||
|
|||
describe('group with ngModel and change event', () => { |
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.
Why not use the existing "group with ngModel"
block? You can just add a change event to the existing test component without affecting the other tests.
@jelbourn Addressed comments |
@jelbourn this is once again green and good to merge! |
LGTM |
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. |
R: @jelbourn
closes #448