Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
fix: no knobs after select
Browse files Browse the repository at this point in the history
* upgraded storybook to support undefined in select
  • Loading branch information
nekitk committed Oct 24, 2019
1 parent 381c918 commit befdb18
Show file tree
Hide file tree
Showing 4 changed files with 1,451 additions and 1,301 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
dist
settings.json
.idea
storybook-static
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"compile": "babel ./src --out-dir ./dist",
"prepublish": "npm run clean && npm run compile",
"build-storybook": "build-storybook",
"build": "yarn build-storybook",
"storybook": "start-storybook -p 9010",
"test": "jest"
},
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typeKnobsMap.forEach(({ name, knob, args = [] }, weight) => addKnobResolver({
}))

const optionsReducer = (res, value) => ({ ...res, [value]: value })
const withDefaultOption = (options) => ({ '--': null, ...options })
const withDefaultOption = (options) => ({ '--': undefined, ...options })
const createSelect = (propName, elements, defaultProps, isRequired) => {
try {
const options = elements
Expand Down
Loading

0 comments on commit befdb18

Please sign in to comment.