Skip to content

Commit 890765b

Browse files
committed
fix(material/slider): make valueChange emit only on change and not on input (#26535)
(cherry picked from commit 6d89b9d)
1 parent 666cc1b commit 890765b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/material/slider/slider-input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA
319319
}
320320

321321
_onChange(): void {
322+
this.valueChange.emit(this.value);
322323
// only used to handle the edge case where user
323324
// mousedown on the slider then uses arrow keys.
324325
if (this._isActive) {
@@ -327,7 +328,6 @@ export class MatSliderThumb implements _MatSliderThumb, OnDestroy, ControlValueA
327328
}
328329

329330
_onInput(): void {
330-
this.valueChange.emit(this.value);
331331
this._onChangeFn(this.value);
332332
// handles arrowing and updating the value when
333333
// a step is defined.

0 commit comments

Comments
 (0)