Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/material/slider/slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export class MatSlider
}
set discrete(v: BooleanInput) {
this._discrete = coerceBooleanProperty(v);
this._updateValueIndicatorUIs();
}
private _discrete: boolean = false;

Expand Down Expand Up @@ -485,8 +486,7 @@ export class MatSlider
eInput._updateStaticStyles();
sInput._updateStaticStyles();

this._updateValueIndicatorUI(eInput);
this._updateValueIndicatorUI(sInput);
this._updateValueIndicatorUIs();

this._hasViewInitialized = true;

Expand Down Expand Up @@ -773,6 +773,19 @@ export class MatSlider
}
}

/** Updates all value indicator UIs in the slider. */
private _updateValueIndicatorUIs(): void {
const eInput = this._getInput(_MatThumb.END);
const sInput = this._getInput(_MatThumb.START);

if (eInput) {
this._updateValueIndicatorUI(eInput);
}
if (sInput) {
this._updateValueIndicatorUI(sInput);
}
}

// Update Tick Mark Track Width
//
// 1. Min, max, or step
Expand Down