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(forms): always call setDisabledState, not just when the control is disabled
#47576
Conversation
82f6605
to
f6f5e07
Compare
64f2e6a
to
10cdf83
Compare
|
The components breakage has now been fixed in angular/components#25790 |
|
merge-assistance: wait for CI to finish, then submit this together with g3 local mod |
…trol is enabled Previously, `setDisabledState` was never called when attached if the control is enabled. This PR fixes the bug, and creates a configuration option to opt-out of the fix. Fixes angular#35309. BREAKING CHANGE: setDisabledState will always be called when a `ControlValueAccessor` is attached. You can opt-out with `FormsModule.withConfig` or `ReactiveFormsModule.withConfig`.
|
This PR was merged into the repository by commit 96b7fe9. |
…trol is enabled (angular#47576) Previously, `setDisabledState` was never called when attached if the control is enabled. This PR fixes the bug, and creates a configuration option to opt-out of the fix. Fixes angular#35309. BREAKING CHANGE: setDisabledState will always be called when a `ControlValueAccessor` is attached. You can opt-out with `FormsModule.withConfig` or `ReactiveFormsModule.withConfig`. PR Close angular#47576
|
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. |
When a CVA is added to a form, reactive forms should always call the setDisabledState method, not just when it's disabled.
This PR provides an option in the forms module config to opt-out, since it's a breaking change. We will likely use that option inside of g3 if too many tests are broken.
Fixes #35309.