Skip to content

Commit

Permalink
fix(i1767): multiple selection component is not working properly
Browse files Browse the repository at this point in the history
  • Loading branch information
gsi-rafaelmayor committed Nov 12, 2020
1 parent 4ca8745 commit c8915fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Form/Inputs/SearchSelect/SearchSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ export const SearchSelect = (props: IProps) => {
!props.allowEmpty && !props.multi
? selection
: props?.multi
? []
? isArray(selection) && !!selection.length
? selection
: []
: '';
setSelection(reset);
if (!!reset) {
Expand All @@ -134,6 +136,7 @@ export const SearchSelect = (props: IProps) => {
props.onChange && props.onChange(reset);
}
};

if (search.length === 0) {
deselect();
}
Expand Down

0 comments on commit c8915fc

Please sign in to comment.