Skip to content

Commit

Permalink
Fix broken MultiSelectCreatable
Browse files Browse the repository at this point in the history
  • Loading branch information
majakomel committed Apr 30, 2024
1 parent 489c4ca commit c7efed2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@styled-system/css": "^5.1.5",
"@styled-system/should-forward-prop": "^5.1.5",
"react-select": "^5.7.7",
"react-select": "^5.8.0",
"styled-system": "^5.1.5"
},
"devDependencies": {
Expand Down Expand Up @@ -100,5 +100,11 @@
"storybook": "storybook dev -p 6006",
"storybook:build": "storybook build"
},
"files": ["dist", "animations", "svgs", "index.d.ts", "icons"]
"files": [
"dist",
"animations",
"svgs",
"index.d.ts",
"icons"
]
}
4 changes: 3 additions & 1 deletion src/components/MultiSelectCreatable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ const MultiSelectCreatable = forwardRef(
}
}

useEffect(() => onChange(value), [value, onChange])
useEffect(() => {
onChange(value)
}, [value, onChange])

return (
<Box {...getMarginProps(rest)}>
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9118,7 +9118,7 @@ react-remove-scroll@2.5.5:
use-callback-ref "^1.3.0"
use-sidecar "^1.1.2"

react-select@^5.7.7:
react-select@^5.8.0:
version "5.8.0"
resolved "https://registry.yarnpkg.com/react-select/-/react-select-5.8.0.tgz#bd5c467a4df223f079dd720be9498076a3f085b5"
integrity sha512-TfjLDo58XrhP6VG5M/Mi56Us0Yt8X7xD6cDybC7yoRMUNm7BGO7qk8J0TLQOua/prb8vUOtsfnXZwfm30HGsAA==
Expand Down

0 comments on commit c7efed2

Please sign in to comment.