Skip to content

Commit

Permalink
chore: fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov committed Sep 18, 2023
1 parent 11be4da commit ed400e1
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions projects/kit/components/input-range/input-range.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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);
}
Expand Down

0 comments on commit ed400e1

Please sign in to comment.