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, input, radio, slide-toggle): implement setDisabledState from ControlValueAccessor #1750

Merged
merged 1 commit into from
Nov 29, 2016

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Nov 6, 2016

Implements the setDisabledState method from the ControlValueAccessor interface in all of the input-related components, in order to support disabling via reactive forms. Note that the select component is missing the implementation, however there's a pending PR for it already (#1667).

Fixes #1171.

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

jelbourn commented Nov 8, 2016

Could you add a unit test for each component that sets disabled on the component and then asserts that the form model is correctly marked as disabled?

@crisbeto
Copy link
Member Author

crisbeto commented Nov 9, 2016

Added unit tests @jelbourn.

@jelbourn
Copy link
Member

LGTM

@jelbourn
Copy link
Member

@crisbeto can you rebase this PR?

… from ControlValueAccessor

Implements the `setDisabledState` method from the `ControlValueAccessor` interface in all of the input-related components, in order to support disabling via reactive forms. Note that the `select` component is missing the implementation, however there's a pending PR for it already (angular#1667).

Fixes angular#1171.
@crisbeto
Copy link
Member Author

Rebased @jelbourn. For some reason the entire slide-toggle.spec got marked as a conflict.

@devversion
Copy link
Member

@crisbeto Yeah that's because we changed the Line endings on the whole file.

@denbezrukov
Copy link

so how it fix? npm from master? thanks.

@tinayuangao tinayuangao merged commit 77a960c into angular:master Nov 29, 2016
@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
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.

[input @alpha.8-1] Setting bound FormControl to disabled causes valueAccessor.setDisabledState error
6 participants