Skip to content

fix(forms): fix enabling form control after it was disabled - #36227

Closed
sonukapoor wants to merge 1 commit into
angular:masterfrom
sonukapoor:form-toggle-enable-disable-fix
Closed

sonukapoor wants to merge 1 commit into
angular:masterfrom
sonukapoor:form-toggle-enable-disable-fix

Conversation

@sonukapoor

Copy link
Copy Markdown
Contributor

Previously, it was not possible to enable a form control after it was disabled.
This commit fixes this by making sure that the form is enabled and that
setDisabledState is called with false.

Closes #35565

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #35565

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Previously, it was not possible to enable a form control after it was disabled.
This commit fixes this by making sure that the form is enabled and that
`setDisabledState` is called with `false`.

Closes angular#35565
@sonukapoor
sonukapoor force-pushed the form-toggle-enable-disable-fix branch from 2a539c8 to 7f07bf2 Compare March 24, 2020 14:10
@JoostK

JoostK commented Mar 24, 2020

Copy link
Copy Markdown
Member

This looks like a replicate of #35311, and possibly even #20310. Especially the former has some prior info on g3 sync results.

@sonukapoor

Copy link
Copy Markdown
Contributor Author

This looks like a replicate of #35311, and possibly even #20310. Especially the former has some prior info on g3 sync results.

Oh, I did not see that PR. I can close mine.

@sonukapoor sonukapoor closed this Mar 24, 2020
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A new FormControl instance can disable an input, but it can't enable it

3 participants