Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Input Component Type 'number' Only Accepts A String Value #3448

Open
alexwasik opened this issue Jul 11, 2024 · 1 comment
Open

[BUG] - Input Component Type 'number' Only Accepts A String Value #3448

alexwasik opened this issue Jul 11, 2024 · 1 comment
Assignees
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working

Comments

@alexwasik
Copy link

NextUI Version

2.4.2

Describe the bug

When using the Input Component it will accept type='number' but you cannot pass a value or defaultValue type of Number. If you pass the numeric value as a String to the Input number type, you cannot use the up/down arrows to modify that number

<Input label='Household Income' type='number' value={clientIncome} />

Screenshot 2024-07-11 at 11 24 28 AM

<Input label='Household Income' type='number' value={String(clientIncome)} />

Screenshot 2024-07-11 at 11 25 06 AM

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Use Input Component, add type='number' and any numeric value (value={1}) or pass in a variable that is a number

Expected behavior

As a user, I expect to be able to pass in a number to an Input with type number and be able to use the up/down errors to change that value. Instead I am required to pass in a string that is not modifiable using those arrows

Screenshots or Videos

No response

Operating System Version

OS: MacOS

Browser

Chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants