-
-
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
select knob seems backwards #799
Comments
Comment by webOS101 Add to this that you cannot set |
Comment by bluetidepro YES. Please fix this. It makes 0 sense why it was done this way. It is completely backwards. |
Comment by ndbroadbent Oh yeah, I was just wondering why my numbers were all getting converted to strings. I was using this: select('Size', { 4: 4, 6: 6, 9: 9 }, 4) This definitely feels backwards. The main reason is because when you use this syntax, your keys must be strings, but the values can be any type. EDIT: Actually, values are serialized in the URL so they will be strings anyway. I think I just need to use |
Yup solid case here, Anyone wants to contribute here? @ndbroadbent @bluetidepro @webOS101 @lifehackett Sounds like it won't be too complex to do. Though it's likely a breaking change. |
fixes #799 add selectV2 for backwards compatibility
fixes #799 add selectV2 for backwards compatibility
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! |
bump |
Added a comment on the associated PR: |
fixes #799 add selectV2 for backwards compatibility
fixes #799 add selectV2 for backwards compatibility
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! |
bump |
Should be merged/solved pretty quick: |
Awesome. Glad to be able to make use of this. I think this issue can be closed. |
I'll close it when the PR is merged 👍 |
Released as |
Issue by lifehackett
Tuesday Nov 01, 2016 at 20:18 GMT
Originally opened as storybook-eol/storybook-addon-knobs#71
Every time I use the
select
knob object syntax I write it incorrectly, but it also is more limiting. IMO it makes more sense that the dropdown would show the keys and on selection pass the value.Additionally, the current setup restricts what can be passed as the prop value to strings or numbers because object keys are more restricted. i.e. you can't have a function or an object in the key position, but you could in the value.
I realize this would be a breaking change.
The text was updated successfully, but these errors were encountered: