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

Error message when removing value from number knob #2475

Closed
binomialstew opened this issue Dec 12, 2017 · 8 comments
Closed

Error message when removing value from number knob #2475

binomialstew opened this issue Dec 12, 2017 · 8 comments

Comments

@binomialstew
Copy link

binomialstew commented Dec 12, 2017

Issue details

There is an error message when removing the value from a "number" knob input:

Warning: `value` prop on `input` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.

I would expect this to be handled by the knob itself so we can avoid having these error messages in our consoles.

Steps to reproduce

This issue can be seen in the cra-kitchen-sink examples. Run the storybook examples and navigate to a story like 'withKnobs - tweaks static values':

http://localhost:9010/?selectedKind=Addon%20Knobs.withKnobs&selectedStory=tweaks%20static%20values&downPanel=storybooks%2Fstorybook-addon-knobs

Delete the 12.5 from the "Dollars" field. When viewing the console, the error described above will show, along with A component is changing a controlled input of type number to be uncontrolled.

Please specify which version of Storybook and optionally any affected addons that you're running

@storybook/react 3.2.17
@storybook/addon-knobs 3.2.17
react 16.2.0

@Hypnosphi
Copy link
Member

Should be quite easy to fix, feel free to send a PR

@M-ZubairAhmed
Copy link

hi can I work on this?

@Hypnosphi
Copy link
Member

Of course @M-ZubairAhmed
Make sure to refer to CONTRIBUTING.md to get familiar with our dev setup

@ah-adarlow
Copy link

A similar issue happens with date knobs as well.

@stale
Copy link

stale bot commented Feb 23, 2018

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 60 days. Thanks!

@stale stale bot added the inactive label Feb 23, 2018
@Hypnosphi Hypnosphi added the todo label Feb 23, 2018
@stale stale bot removed the inactive label Feb 23, 2018
@kaitmore
Copy link

hi @Hypnosphi! I have a PR for this, but I'm getting permission denied when I try to push to origin.

@binomialstew
Copy link
Author

@kaitmore, I don't think this is set up to allow direct PRs. You can fork the repo and set the PR to come from your fork, though.

@Hypnosphi
Copy link
Member

Released as 4.0.0-alpha.3

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

No branches or pull requests

5 participants