-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Knobs numbers return null instead of undefined #6591
Comments
I think this is a dupe to #4487 Right @Hypnosphi ? |
Looks like a completely different issue to me |
I dont believe it's a duplicate of #4487 but clearly related. The problem with 'select' knobs require another solution then this does. The 'number' knobs is because it's has been choosen at some point to return 'null' |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook! |
I'm experiencing the same issue as well. |
This is my workaround that worked for me: export const knobsStory = () => (
<MyComponent myNum={number('My Number', 0.5) || undefined} />
); |
Describe the bug
I know somebody would say that this is not an error,
but knobs 'number' dont work with default parameter values because
it returns null instead of undefined on empty string.
To Reproduce
(And this is because default values only works with undefined and not null)
Expected behavior
expect undefined, not null
Code snippets
storybook/addons/knobs/src/converters.js
Line 18:
Should be:
bs and good in general :)
The text was updated successfully, but these errors were encountered: