Skip to content

Slider disabled state not honoured without change #7943

Description

@cparkinsonMYCM

Reproduction link

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

Steps to reproduce

  • Have the nzDisabled attribute on the slider component be set to true when the component is initialized.
  • See the slider is visually in a disabled state (it is grey)
  • Drag the handle, see that the field is not disabled.

What is expected?

Initial state of true for nzDisabled should correctly disable the field.

What is actually happening?

If the value of the nzDisabled attribute is initially set to true the slider looks like it is disabled but the handles are draggable which updates the field value.
When the state of nzDisabled is changed (Either by defaulting to false and changing to true, or by being toggled twice from true to false to true) then the disabled state is applied correctly and the handles are not draggable.
The same is true of the range-slider too.

Environment Info
ng-zorro-antd 15.1.0
Browser Chrome

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions