We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00886f8 commit 8f89466Copy full SHA for 8f89466
src/components/InputNumber/index.tsx
@@ -87,10 +87,20 @@ export const InputNumber = forwardRef<InputNumberProps, 'input'>(
87
onChange(v);
88
}
89
if (e.key === 'ArrowUp') {
90
- onChange(clamp((v ?? 0) + (e.shiftKey ? bigStep : step), { min, max }));
+ const newValue = clamp((v ?? 0) + (e.shiftKey ? bigStep : step), {
91
+ min,
92
+ max,
93
+ });
94
+ setRawInput(String(newValue));
95
+ onChange(newValue);
96
97
if (e.key === 'ArrowDown') {
- onChange(clamp((v ?? 0) - (e.shiftKey ? bigStep : step), { min, max }));
98
+ const newValue = clamp((v ?? 0) - (e.shiftKey ? bigStep : step), {
99
100
101
102
103
104
105
rest.onKeyDown?.(e);
106
};
0 commit comments