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

Wrong type definition for NumberInput - step prop #513

Closed
gguidotti opened this issue Mar 29, 2022 · 1 comment
Closed

Wrong type definition for NumberInput - step prop #513

gguidotti opened this issue Mar 29, 2022 · 1 comment

Comments

@gguidotti
Copy link

Detailed description

Describe in detail the issue you're having.
When using the NumberInput component, if I use a number as the "step" prop (eg. ) everything works just fine. However, in order to use a decimal NumberInput, I had to pass "step" prop a decimal value. Passing in a number (step={0.2}) I get a console error about value.split not being a function, while passing in a string (step="0.1") works fine but gives me a console warning about wrong typings (expecting a number but getting a string instead).

Is this issue related to a specific component?
NumberInput

What did you expect to happen? What happened instead? What would you like to see changed?
Enrich type definition by covering both "number" and "string"?
No warning shown.

What version of the WFP UI (Carbon Design System) are you using?
@wfp/ui@1.20.10

cassandrakesewa added a commit that referenced this issue Mar 31, 2022
Utzel-Butzel pushed a commit that referenced this issue Apr 4, 2022
## [1.20.11](v1.20.10...v1.20.11) (2022-04-04)

### Bug Fixes

* **NumberInput:** NumberInput ttype definition covering both number and string for step prop [#513](#513) ([95dc162](95dc162))
@gguidotti
Copy link
Author

Can confirm issue was fixed in 1.20.11 release. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant