Skip to content

Commit

Permalink
Fix multiselect
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickseguraoddball committed Dec 6, 2024
1 parent 6ec34e3 commit c076bdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/MultiSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,15 @@ const MultiSelect = ({

useEffect(() => {
setOriginalOptions([...condensedOptions]);
}, [condensedOptions]);
}, [groupedOptions]); // eslint-disable-line react-hooks/exhaustive-deps

useEffect(() => {
setSelected(
initialValues
? originalOptions.filter(option => initialValues.includes(option.value))
: []
);
}, [initialValues, originalOptions, condensedOptions]);
}, [initialValues, originalOptions]);

const sortSelectedTags = (order: 'asc' | 'desc' | string) => {
switch (order) {
Expand Down

0 comments on commit c076bdf

Please sign in to comment.