fix(range): update range ratio when new min/max are passed (#15512)

fixes #15511
This commit is contained in:
Alessandro Genova
2018-09-13 13:29:28 -04:00
committed by Manu MA
parent db35af21f2
commit f62601fb0a
2 changed files with 39 additions and 0 deletions

View File

@ -68,11 +68,23 @@ export class Range {
* Minimum integer value of the range. Defaults to `0`.
*/
@Prop() min = 0;
@Watch('min')
protected minChanged() {
if (!this.noUpdate) {
this.updateRatio();
}
}
/**
* Maximum integer value of the range. Defaults to `100`.
*/
@Prop() max = 100;
@Watch('max')
protected maxChanged() {
if (!this.noUpdate) {
this.updateRatio();
}
}
/**
* If true, a pin with integer value is shown when the knob