-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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 Addon throws propType warnings, creates array for boolean. #1265
Comments
just to add to this, it seems to get rendered a couple times, the first few times being as i'd expect (i.e. not an array, but a boolean). The following output is with the following, which i would have expected to get called only once: console.log(boolean('fastTrack', props.fastTrack), props.fastTrack) |
Hey, |
Here we go, this should fix it :) Also thanks @jkempff for easy to reproduce case. 👍 |
…deserialization Fix addon knobs proptypes deserialization
@alexandrebodin reopening since we have not released this yet. thanks! |
@jkempff @peter-mouland @alexandrebodin @Gongreg Fix for this has been released in |
I am currently upgrading the project I am working on to @storybook/[email protected] (latest).
We are heavily using the
addon-knobs
addon, which now is behaving a little strange. I get many prop type warnings like this one:I am currently running [email protected] with all @storybook projects with their latest version.
I also was able to reproduce this, when running the example given in
./addons/knobs
against the master. It results in the same "Invalid propt ... expectedstring
" warnings forDateType
,BooleanType
,ArrayType
andObjectType
.Additionally the boolean value becomes an array, when refreshing the page.
Given the following story:
The
console.log
prints:..which of course also results in a prop type warning.
To make it easier to reproduce the issue, I created a minimal setup which you can simply clone:
https://github.com/jkempff/storybook-addon-knobs-proptypes-issue
The text was updated successfully, but these errors were encountered: