Skip to content

Commit

Permalink
fix: reimplement label rendering solution
Browse files Browse the repository at this point in the history
Co-authored-by: jasmyneokudo <[email protected]>
Co-authored-by: seunexplicit <[email protected]>
  • Loading branch information
3 people committed Feb 16, 2024
1 parent 0cd3b4f commit 64423c2
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,15 @@ function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingl
if (!Array.isArray(item.value)) {
return [];
}
return item.value;
}, [item.value]);

return item.value.reduce<ValueOptions[]>((acc, value) => {
const resolvedValue = resolvedValueOptions.find((v) => getOptionValue(v) === value);
if (resolvedValue != null) {
acc.push(resolvedValue);
}
return acc;
}, [] as ValueOptions[]);
}, [getOptionValue, item.value, resolvedValueOptions]);

const handleChange = React.useCallback<
NonNullable<AutocompleteProps<ValueOptions, true, false, true>['onChange']>
Expand Down

0 comments on commit 64423c2

Please sign in to comment.