Skip to content

bug(mat slider): Thumb position not updating after max value changes #31599

@mark-langer

Description

@mark-langer

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

v16

Description

If the max attribute of the slider is lower than the value bound to the slider's thumb, the position is limited to the max value ✅
But if max is set to a higher value again which would allow the bound value again, the thumb doesn't update.

Reproduction

Reproduction on the Angular Material demo site:
Image

Expected Behavior

The thumb is always positioned correctly depending on the inputs of min, max and value/ngModel.

Actual Behavior

The thumb is positioned based on the lowest maxValue ever provided. It only updates as soon as the input binding for value changes.

Environment

  • Angular: 20.1.2
  • CDK/Material: 20.1.2
  • Browser(s): Firefox 140.0.4, Chrome 138.0.7204.158
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions