Skip to content

Disable state for ReactiveForms not working correctly #17985

Closed

Description

@kevinclerc

Mini app sample which shows the problem:
https://stackblitz.com/edit/angular-mbvopj

Expected Behavior

When I toggle the disable state, I expect, that all fields are disabled

Actual Behavior

Only the text field gets disabled but the mat-select stays enabled.
Ps: The same happens with mat-slide-toggle as well.

Environment

  • Angular: 8.0.0
  • CDK/Material: 8.2.3
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): MacOS / Windows

Activity

  1. crisbeto commented on Dec 17, 2019

    @crisbeto
    Member

    The problem is that you're swapping out the entire form group, rather than just disabling the existing one which our components aren't set up to handle. There's a fix for mat-select at #17872, but we probably need to make a pass over the other components.

  2. kevinclerc commented on Dec 17, 2019

    @kevinclerc
    Author

    Thx @crisbeto for your reply
    The use case requires that I swap out the whole form. (It's some kind of generic form component). So I need to change the whole form.

    Do you know, when this fix will be merged? Or can I add a workaround in my code to fix this?

  3. added
    forms
    P3
    on Dec 19, 2019
  4. osnoser1 commented on Jul 18, 2020

    @osnoser1

    I have the same problem and occurs with the mat-radio-group too 😢

  5. crisbeto commented on May 29, 2026

    @crisbeto
    Member

    We are closing this issue, because we've determined, using a semi-automated process, that it is no longer relevant, has low engagement, or it does not have enough information to proceed. Feel free to comment if you think the issue should be reopened, or open a new issue with the latest version of our code instead.

  6. angular-automatic-lock-bot commented on Jul 1, 2026

    @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.

  7. locked and limited conversation to collaborators on Jul 1, 2026
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

    P3action: close-candidatearea: material/selectforms

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions