Skip to content

Commit

Permalink
Fix number input update bug (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
shueja authored Aug 2, 2023
1 parent 42769b8 commit b598f34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class Input extends Component<Props, State> {
}

render() {
// If the element is not focused, it means the number changed from outside. Update the truncated display.
if (document.activeElement !== this.numberRef.current) {
this.correctNumber();
}
return (
<>
<span
Expand Down

0 comments on commit b598f34

Please sign in to comment.