Skip to content

FormControl does not reflect the new disabled value #17806

Closed

Description

@dzonatan

I'm submitting a ...

[X] Bug report

Current behavior

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

http://plnkr.co/edit/g5yxZRs8PvJWPAIag7wj?p=preview

Please tell us about your environment

Angular version: 4.2.4

Browser:
- [X] Chrome (desktop) version 58.0

Activity

  1. changed the title [-]FormControl does not reflect to the new disabled value[/-] [+]FormControl does not reflect the new disabled value[/+] on Jun 28, 2017
  2. added this to the Backlog milestone on Jan 23, 2018
  3. alantreadway commented on Aug 16, 2018

    @alantreadway

    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):

    • 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.
  4. chandrasagarjain commented on Jan 27, 2020

    @chandrasagarjain

    Is there any update on this bug?

  5. pavankjadda commented on Mar 11, 2020

    @pavankjadda
    Contributor

    I just wasted couple of hours on this, Any update?

  6. etay2000 commented on Apr 25, 2020

    @etay2000

    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?

  7. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    and removed on Oct 1, 2020
  8. AndrewKushnir commented on Nov 17, 2020

    @AndrewKushnir
    Contributor

    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.

  9. angular-automatic-lock-bot commented on Dec 19, 2020

    @angular-automatic-lock-bot

    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.

  10. locked and limited conversation to collaborators on Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions