ui: filterout empty options

This commit is contained in:
nick-delirium 2024-12-11 17:25:41 +01:00
parent e13804009a
commit 6c25dd7cad
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -29,7 +29,7 @@ function FilterAutoCompleteLocal(props: { params: any, values: string[], onClose
values,
} = props;
const [options, setOptions] = useState<{ value: string; label: string }[]>(
values.map((value) => ({ value, label: value }))
values.filter(val => val.length).map((value) => ({ value, label: value }))
);
const onApplyValues = (values: string[]) => {