Skip to content

Commit

Permalink
fix: uncheck item when selected and clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
HellWolf93 committed Jun 26, 2020
1 parent 0db1cd5 commit d5e58e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/InternalDropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const InternalDropdown = forwardRef((props, reference) => {
if (multiple) {
if (Array.isArray(value)) {
if (value.some(v => v.name === name)) {
return null;
return onChange(value.filter(v => v.name !== name));
}
return onChange(value.concat([option]));
}
Expand Down

0 comments on commit d5e58e1

Please sign in to comment.