Skip to content

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 crisbeto force-pushed the 1171/accessor-disabled-state branch from 8ee8c87 to bfc9ff5 Compare November 9, 2016 18:48
@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 crisbeto force-pushed the 1171/accessor-disabled-state branch from bfc9ff5 to 9ed475b Compare November 19, 2016 07:59
@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