From ed400e1069ff855642bf0dd62e66790dd6005622 Mon Sep 17 00:00:00 2001 From: Nikita Barsukov Date: Mon, 18 Sep 2023 13:45:15 +0300 Subject: [PATCH] chore: fix review comments --- .../components/input-range/input-range.component.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/projects/kit/components/input-range/input-range.component.ts b/projects/kit/components/input-range/input-range.component.ts index 841db5f967e2..2be74886a463 100644 --- a/projects/kit/components/input-range/input-range.component.ts +++ b/projects/kit/components/input-range/input-range.component.ts @@ -181,11 +181,9 @@ export class TuiInputRangeComponent } onTextInputFocused(focused: boolean): void { - if (focused) { - return; + if (!focused) { + this.updateTextfieldValues(this.value); } - - this.updateTextfieldValues(this.value); } changeByStep( @@ -202,10 +200,8 @@ export class TuiInputRangeComponent this.value[0] + leftCoefficient * this.step, this.value[1] + rightCoefficient * this.step, ]); - const leftValueChanged = newValue[0] !== this.value[0]; - const rightValueChanged = newValue[1] !== this.value[1]; - if (leftValueChanged || rightValueChanged) { + if (newValue[0] !== this.value[0] || newValue[1] !== this.value[1]) { this.safelyUpdateValue(newValue); this.updateTextfieldValues(this.value); }