[BUG] - Input type only accepts string
NextUI Version
2.0.18
Describe the bug
Input component only accepts a value of type string and is forcing number input values to be converted to strings.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
- Attempt to set value of Input to anything other than a string
Expected behavior
Input allows value to be numbers in addition to strings.
Screenshots or Videos
Operating System Version
Any
Browser
Chrome
I'll take this.
Hey @dml0031 this is expected since the Input is based on useTextField react-aria hook https://react-spectrum.adobe.com/react-aria/useTextField.html#usetextfield, we will create a separate component based on the useNumberField hook for numeric inputs. In the meantime, you can cast the value from your side.
Stay tuned 👍🏻
Got it, that was my temporary fix at all, was just a struggle for deeply nested objects but think I have a temp solution. Appreciate it.