Repository navigation
Conversation
AndrewKushnir
left a comment
There was a problem hiding this comment.
@jermowery thanks for creating a PR! 👍 I left a couple nits, please have a look.
It looks like this PR also introduces behavior change for Forms, where setDisabledState is called in situations where it was not called before. Could you please try to run Global TAP with this change to see if there are targets that might be potentially affected?
Thank you.
There are 3 specs failing as a result of this change. 2 of which are in my own codebase. I will put together a CL that can be patched with the fixes for the Angular caretaker doing the sync |
appropriate When a CVA is added a form and that CVA implements setDisabledState the reactive form directives should call setDisabledState with true when the FormControl is disabled and false when it is enabled. Currently, setDisabledState is only called when the FormControl is disabled. Fixes #35309 Fix based on comments
AndrewKushnir
left a comment
There was a problem hiding this comment.
Thanks for additional changes @jermowery!
There are 3 specs failing as a result of this change. 2 of which are in my own codebase. I will put
together a CL that can be patched with the fixes for the Angular caretaker doing the sync
Thanks for verifying this in g3 👍Given that there are some (minor) breakages, I'd like to ask @kara to have a look at this PR too, to make sure we assess the risks accordingly.
Thank you.
|
I just took another look at my Global TAP and it looks like there are more changes than anticipated. I will discuss with you all tomorrow |
|
Hi @jermowery, I was working on a similar PR, but noticed that your PR already covers what I was going to change as well. Is there anything I can help with for this PR? |
|
Unfortunately, this breaks a significant number of tests inside Google, and I don't have to bandwidth to fix them, so this PR is pretty much abandoned |
|
Hi @jermowery, since this is a breaking change and it affects a lot of targets internally in google3, I was thinking if we should consider adding a config option similar to the |
|
That seems reasonable. Sadly I don't have the bandwidth right now to incorporate that change but feel free to adopt this PR if it is a priority |
|
@jermowery / @AndrewKushnir I would be happy to make this change. |
|
What's the status of this being implemented? |
|
There is already this PR #20310. I think it's the same fix. |
|
Sorry for disturbing you but do you have any update about this point? To workaround this, I had to recreate a custom radio button component with an override on NG_VALUE_ACCESSOR. Already 3 years since this bug has been discovered without any fix... Thank you in advance |
|
Hi @Jakartoine, Unfortunately we don't have any updates on this issue at this moment. The problem with the fix is that it requires a breaking change: it changes the behavior (to be more correct), but this affects existing apps since some of them rely on the current sequence of calls to the Thank you. |
|
Alright, it sounds clearer now. Thank you for your response mate. |
|
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 a form and that CVA implements setDisabledState the
reactive form directives should call setDisabledState with true when the
FormControl is disabled and false when it is enabled. Currently,
setDisabledState is only called when the FormControl is disabled.
Fixes #35309
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
setDisabledState when adding a control to a form is called with true with the FormControl is disabled and not called when the FormControl is enabled.
Issue Number: #35309
What is the new behavior?
setDisabledState is called when adding a control to a form with false when the FormControl is enabled and true with the FormControl is disabled.
Does this PR introduce a breaking change?