Closed
Description
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
No response
Description
I am changing slider's max value in my component while/after doing some works. And it seems it has a problem updating visually when new max value is 0.
Reproduction
Steps to reproduce:
- Define slider like this:
<mat-slider min="0" [displayWith]="displayValue" [max]="maxValue" step="1" [thumbLabel]="true" [tickInterval]="1" [(ngModel)]="sliderValue" (ngModelChange)="changeSliderValue()"></mat-slider>
- Default sliderValue is 0, maxValue is 0.
- Click a button and change maxValue - let's say to 6. Updates slider and ticks correctly.
- Click another button and change maxValue to 0. Updates slider and ticks incorrectly, shows previous ticks.
- You can see the same bug here: https://material.angular.io/components/slider/examples
Expected Behavior
Updating slider and ticks correctly.
Actual Behavior
Updated slider and ticks incorrectly.
Environment
- Angular: 10.2.0
- CDK/Material: 11.0.2
- Browser(s): Chome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 x64