-
-
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
4.0.0-rc.6: knob "select" with a simple array only shows a "k" option #4560
Comments
@ndelangen FYI |
Found out the issue, fix is in #4586. |
@diagramatics @ndelangen it still does not work on 4.0.0 |
I'm running into the same issue. I don't think this was actually fixed. :( |
Just checked, turns out the PR isn't cherry picked in |
@DanielG2002 @teddybradford @diagramatics, temporarily fixed it with https://github.com/ds300/patch-package
patch-package
--- a/node_modules/@storybook/addon-knobs/dist/components/types/Select.js
+++ b/node_modules/@storybook/addon-knobs/dist/components/types/Select.js
@@ -21,7 +21,7 @@ var SelectType = function SelectType(_ref) {
var options = knob.options;
var entries = Array.isArray(options) ? options.reduce(function (acc, k) {
return Object.assign(acc, {
- k: k
+ [k]: k
});
}, {}) : options;
var selectedKey = Object.keys(entries).find(function (k) { |
@diagramatics I'll get it into a release today. |
(bug) Fix Select array values showing k (fixes #4560)
select("locale", ["es", "en"], "en")
The text was updated successfully, but these errors were encountered: