Skip to content

MatSelectionList disabled input is only checked at creation time #9952

@amandabot

Description

@amandabot

Bug, feature request, or proposal:

MatSelectionList's disabled input does not update child list option styles if it is changed.

What is the expected behavior?

Changing the disabled input should update the appearance of the list's items.

What is the current behavior?

List items retain their style.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-x4tdc2

  1. Select any item from the list
  2. Click the button to toggle the disabled state of the selection list
  3. Observe the styles of each item; they remain active
  4. Click any item; the style toggles to the expected disabled style
  5. Click the button to toggle the disabled state of the selection list
  6. Click any item; the style toggles to the expected enabled style

What is the use-case or motivation for changing an existing behavior?

It's not clear whether disabled is meant to be a one-time setting or if it is meant to be dynamic. In the former case, the docs should be more clear about it; if it's the latter, the component does not behave as expected

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 5.2.3
Material 5.2.0
TypeScript 2.6.2

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions