You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FormControl does not reflect the new disabled value #17806
When setting new FormControl instance to [formControl]/formControlName directive the disabled property/attribute of control DOM element does not update to the newest value.
Expected behavior
When setting new FormControl instance to [formControl]/formControlName directive the disabled property/attribute of control DOM element should reflect the newest value.
Minimal reproduction of the problem with instructions
changed the title [-]FormControl does not reflect to the new disabled value[/-][+]FormControl does not reflect the new disabled value[/+]on Jun 28, 2017
Not sure if there is a race/conflict between the update of the disabled state on the host element, although all update sources should be setting identical values if they are based on FormControl.disabled anyway, even after the proper fix.
Guessing this is sub-optimal in terms of change-detection due to the use of a method call on every change-detector pass.
Reacted by Rokas Brazdžionis, AlexBilonog and Michał Szreder
Figured I'd add a comment here just to prevent the conversation from being ignored and then automatically locked as per usual. How is it possible to have 587 pending pull requests? Is Google unwilling to pay more employees to work on Angular? I realize it is open source, but seriously wtf?
Activity
[-]FormControl does not reflect to the new disabled value[/-][+]FormControl does not reflect the new disabled value[/+]alantreadway commentedon Aug 16, 2018
Since this issue and PR don't seem to be going anywhere, here's a workaround that seems to be working for me which can be easily removed if/when an actual fix is released:
https://gist.github.com/alantreadway/773c4880585bc9eb27703b3073c7fcd2
Caveats (YMMV):
disabledstate on the host element, although all update sources should be setting identical values if they are based onFormControl.disabledanyway, even after the proper fix.chandrasagarjain commentedon Jan 27, 2020
Is there any update on this bug?
pavankjadda commentedon Mar 11, 2020
I just wasted couple of hours on this, Any update?
etay2000 commentedon Apr 25, 2020
Figured I'd add a comment here just to prevent the conversation from being ignored and then automatically locked as per usual. How is it possible to have 587 pending pull requests? Is Google unwilling to pay more employees to work on Angular? I realize it is open source, but seriously wtf?
AndrewKushnir commentedon Nov 17, 2020
Hi, it looks like this issue has the same root cause as #35309, so I'm closing this PR in favor of #35309. Thank you.
angular-automatic-lock-bot commentedon Dec 19, 2020
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.