multi auto complete
This commit is contained in:
@@ -142,16 +142,19 @@ function renderFilterInput(
|
||||
);
|
||||
}
|
||||
|
||||
const selected = Array.isArray(value) ? value : [];
|
||||
return (
|
||||
<Autocomplete
|
||||
key={fieldName}
|
||||
multiple
|
||||
options={options}
|
||||
value={value ?? null}
|
||||
onChange={(_, val) => onChange("value", val || undefined)}
|
||||
value={selected}
|
||||
onChange={(_, val) => onChange("value", val.length > 0 ? val : undefined)}
|
||||
ChipProps={{ size: 'small' }}
|
||||
renderInput={(params) => (
|
||||
<TextField {...params} label={field.label} size="small" />
|
||||
)}
|
||||
sx={{ minWidth: 180 }}
|
||||
sx={{ minWidth: 220 }}
|
||||
size="small"
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user