Skip to content

Commit

Permalink
Fix #2677: InputNumber invalid $refs (#3473)
Browse files Browse the repository at this point in the history
* Fix #3470: Datatable custom restore state column fix

* Fix #2677: InputNumber invalid $refs
  • Loading branch information
melloware authored Oct 12, 2022
1 parent c2159cb commit e28196e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export const InputNumber = React.memo(
_decimal.current.lastIndex = 0;

if (decimalLength) {
$refs.input.$el.setSelectionRange(selectionStart + 1, selectionStart + 1);
inputRef.current.setSelectionRange(selectionStart + 1, selectionStart + 1);
} else {
newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);
}
Expand Down

0 comments on commit e28196e

Please sign in to comment.