multi auto complete

This commit is contained in:
2026-05-24 13:58:00 +05:30
parent 4a3428ed8f
commit 6803fb6b56
2 changed files with 16 additions and 4 deletions

View File

@@ -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"
/>
);