Skip to content

Commit

Permalink
chore: refactor return statement
Browse files Browse the repository at this point in the history
  • Loading branch information
albaranau committed Jun 4, 2024
1 parent a02ad9c commit 03d7340
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,7 @@ export function MultiselectChipWithSearch<I extends SelectableItem>({
search: inputValue,
filter,
});
if (transformSearchResults) {
return transformSearchResults(filtered, inputValue);
}
return filtered;
return transformSearchResults ? transformSearchResults(filtered, inputValue) : filtered;
}, [items, selectedItems, filter, transformSearchResults, inputValue]);

const { getDropdownProps, removeSelectedItem, reset } = useMultipleSelection({
Expand Down

0 comments on commit 03d7340

Please sign in to comment.