diff --git a/projects/kit/components/input-range/input-range.component.ts b/projects/kit/components/input-range/input-range.component.ts index 2be74886a463..69fdc8775704 100644 --- a/projects/kit/components/input-range/input-range.component.ts +++ b/projects/kit/components/input-range/input-range.component.ts @@ -202,8 +202,7 @@ export class TuiInputRangeComponent ]); if (newValue[0] !== this.value[0] || newValue[1] !== this.value[1]) { - this.safelyUpdateValue(newValue); - this.updateTextfieldValues(this.value); + this.onExternalValueUpdate(newValue); } } @@ -215,7 +214,7 @@ export class TuiInputRangeComponent this.safelyUpdateValue([this.value[0], value ?? this.safeCurrentValue[1]]); } - onRangeValue(value: [number, number]): void { + onExternalValueUpdate(value: [number, number]): void { this.safelyUpdateValue(value); this.updateTextfieldValues(this.value); } diff --git a/projects/kit/components/input-range/input-range.template.html b/projects/kit/components/input-range/input-range.template.html index e88cdc3ee6ba..3d347ce0c144 100644 --- a/projects/kit/components/input-range/input-range.template.html +++ b/projects/kit/components/input-range/input-range.template.html @@ -75,7 +75,7 @@ [segments]="segments" [step]="step" (activeThumbChange)="onActiveThumbChange($event)" - (ngModelChange)="onRangeValue($event)" + (ngModelChange)="onExternalValueUpdate($event)" (tuiPressedChange)="focusToTextInput()" >