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

Addon-knobs: Add object[] support for select #7957

Merged

Conversation

matthewliuswims
Copy link
Contributor

Issue: #810 (was closed long ago). I may be misinterpreting the post, but when OP said he desired his options to look like below

Screen Shot 2019-09-02 at 12 16 58 AM

I thought that was for (or included) the select knob. However, I was surprised to see that the select knob still could NOT take options as an array of objects (only an array of strings). Thus....

What I did

  1. I made it so that the select knob can take in an array OF objects.
  2. modified README to document this change

How to test

in official-storybook/stories/addon-knobs/with-knobs.stories.js I added an example for testing purposes and documentation.

@vercel
Copy link

vercel bot commented Sep 2, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/f59tdv1gj
🌍 Preview: https://monorepo-git-fork-matthewliuswims-addon-knobs-array-of-objects.storybook.now.sh

@matthewliuswims
Copy link
Contributor Author

@shilman I was wondering why there is a do not merge label. I'm happy to make changes to fix it.

@shilman
Copy link
Member

shilman commented Sep 4, 2019

@matthewliuswims Sorry I forgot to explain. We're in the final stages of 5.2 release, so we're not merging any features until that's out (Sep 16 target). Making this explicit with the label since we're a distributed team and it's hard to coordinate.

@matthewliuswims
Copy link
Contributor Author

@shilman understood. Thank you :)

@matthewliuswims
Copy link
Contributor Author

matthewliuswims commented Sep 18, 2019

@shilman congrats on the 5.2 release! now that it's out, would it be possible to get this PR reviewed + remove the do not merge tag?

edit: I see there was a merge conflict, let me resolve it real quick first
edit2: build pipeline is now failing :s I don't really understand the errors, going to post in the discord!

@shilman shilman changed the title addon-knobs now support options as an array OF objects for select. fixes issue #810 Addon-knobs: Add object[] support for select Nov 13, 2019
@storybookjs storybookjs deleted a comment from stale bot Nov 13, 2019
@shilman shilman merged commit aec46e4 into storybookjs:next Nov 13, 2019
@duhseekoh
Copy link

duhseekoh commented Dec 6, 2019 via email

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

Successfully merging this pull request may close these issues.

5 participants