-
-
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
[addon-controls] select options object format is reversed #12613
Comments
Is this actually a bug? Arg names must be strings, but arg values can be anything. So the current schema makes more sense to me than the proposed reversal. |
I have the same issue as @VladimirCores has. @VladimirCores did you find out why this happens? |
@shilman looks like I found out when we have the issue described by @VladimirCores. When value of option is string it works great. But when the value of option is object it works like @VladimirCores described. this works good: but this has issue: |
We are experiencing the same problem by @VladimirCores too. |
Control options must be simple strings so they can be serialized and synced to the URL. To allow any kind of value to be used and controlled as arg, we're working on a new |
As of Storybook 6.2, As mentioned before, we've introduced We've also introduced |
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Build any story with addon-controls and :
Expected behavior
The
<select>
should display a list of "Value 1, Value 2" and the story should receive "val1, val2" as arg.What is happening instead
The
<select>
displays a list of "val1, val2" and the story receives "Value 1, Value 2" as arg.System
Additional notes
Current dirty patch involves:
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: