Skip to content

Commit

Permalink
This fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
onesine committed Aug 10, 2022
1 parent e190d99 commit 85a57ef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ const Select = ({options = [], value = null, onChange, placeholder="Select...",

const choseOption = useCallback((option) => {
function update () {
if (!isMultiple) {
if (!isMultiple)
closeDropDown();
}
onChange(!isMultiple ? option : (value === null ? [option] : [...value, option]));
}
if (value !== null) {
Expand Down

0 comments on commit 85a57ef

Please sign in to comment.