You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Components with useNumberField() and useNumberFieldState() are not compatible with React.StrictMode.
I searched for number field and strict mode in the github issues.
🤔 Expected Behavior
I click on the increment or decrement button and it changes the number on click. I use the keyboard cursor keys up or down and it changes the number.
😯 Current Behavior
Single clicking a button does nothing. Long clicking a button sometimes changes the numbers. I have to use keyboard cursor key up and down, afterwards I can e.g. increase a number by using key up twice, i.e. it will increase the number after the second key press.
💁 Possible Solution
Seems the event handlers for the buttons and keys are wrong.
🔦 Context
I want to use a number input with react strict in development mode.
Thanks for letting us know. I've verified something is happening in that codesandbox, I don't know what yet, but I'll reopen so we can look into it further.
🐛 Bug Report
Components with
useNumberField()
anduseNumberFieldState()
are not compatible withReact.StrictMode
.I searched for number field and strict mode in the github issues.
🤔 Expected Behavior
I click on the increment or decrement button and it changes the number on click. I use the keyboard cursor keys up or down and it changes the number.
😯 Current Behavior
Single clicking a button does nothing. Long clicking a button sometimes changes the numbers. I have to use keyboard cursor key up and down, afterwards I can e.g. increase a number by using key up twice, i.e. it will increase the number after the second key press.
💁 Possible Solution
Seems the event handlers for the buttons and keys are wrong.
🔦 Context
I want to use a number input with react strict in development mode.
💻 Code Sample
https://codesandbox.io/p/sandbox/quirky-star-z0odrx?file=%2Fsrc%2FApp.tsx
🌍 Your Environment
Does not work with
Also does not work with
🧢 Your Company/Team
🕷 Tracking Issue (optional)
The text was updated successfully, but these errors were encountered: