From e28196e021533ea934c0012d6e712f3095fdf092 Mon Sep 17 00:00:00 2001 From: Melloware Date: Wed, 12 Oct 2022 08:02:30 -0400 Subject: [PATCH] Fix #2677: InputNumber invalid $refs (#3473) * Fix #3470: Datatable custom restore state column fix * Fix #2677: InputNumber invalid $refs --- components/lib/inputnumber/InputNumber.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/inputnumber/InputNumber.js b/components/lib/inputnumber/InputNumber.js index 6605785564..0c1728d46e 100644 --- a/components/lib/inputnumber/InputNumber.js +++ b/components/lib/inputnumber/InputNumber.js @@ -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); }