Filter fix

Signed-off-by: Ivona Josipovic

Signed-off-by: Ivona Josipovic <josipovic.ivona@gmail.com>
This commit is contained in:
Ivona Josipovic
2023-11-08 08:44:25 +01:00
parent 94b9fa4e32
commit 2321160340
@@ -218,15 +218,21 @@ export function SelectComponent(props: SelectProps) {
renderValue={s =>
multiple && (value as any[]).length !== 0 ? (
<Box className={classes.chips}>
{(s as string[]).map(selectedValue => (
<Chip
key={items.find(el => el.value === selectedValue)?.value}
label={items.find(el => el.value === selectedValue)?.label}
clickable
onDelete={handleDelete(selectedValue)}
className={classes.chip}
/>
))}
{(s as string[]).map(selectedValue =>
items.find(el => el.value === selectedValue) ? (
<Chip
key={items.find(el => el.value === selectedValue)?.value}
label={
items.find(el => el.value === selectedValue)?.label
}
clickable
onDelete={handleDelete(selectedValue)}
className={classes.chip}
/>
) : (
false
),
)}
</Box>
) : (
<Typography>