-
-
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
Add support for array of objects #810
Comments
Comment by royair my options param looks like this:
|
Is anyone working on this? Seems like such an obvious feature to support?! |
I'll give it a try! |
AWESOME, let me know if there's something I can help with 👍 |
I think you can actually just use object to handle an array of objects: seems to work for me |
@byrekt I can imagine that's good for lots of cases! |
You can use it as @byrekt suggest, but React will complain about the types : A workaround is to create a wrapper component:
|
Yeah, I think we should update the propType |
@mcmunder Any updates on this, kind of critical thing for me. |
@vipulbhavsar94 Should not be critical, you can use my workaround until is fixed. |
I found another way to make array of objects, don't know if it's a right way. This is an example of story for Socials component, which takes an array of objects with information about each social (name, href) and displays it as list:
|
@illyon nice solution! Works good when you have a fixed set of expected objects |
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. We do try to do some housekeeping every once in a while so inactive issues will get closed after 60 days. Thanks! |
Fixed in 3.2.15 |
Great Caesar's ghost!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.45 containing PR #7957 that references this issue. Upgrade today to try it out! You can find this prerelease on the |
Naive question - Is this fix also implemented for @storybook/angular? |
@HoplaGeiss yeah, it's a knob thing, so should be framework-independent |
Issue by royair
Wednesday Mar 29, 2017 at 18:09 GMT
Originally opened as storybook-eol/storybook-addon-knobs#94
The text was updated successfully, but these errors were encountered: