Files
react-test/docs/data/material/components/autocomplete/CustomSingleValueRendering.tsx.preview

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
499 B
Plaintext
Raw Permalink Normal View History

2025-12-12 14:26:25 +09:00
<Autocomplete
options={top100Films}
getOptionLabel={(option) => option.title}
renderValue={(value, getItemProps) => (
<Chip label={value.title} {...getItemProps()} />
)}
renderInput={(params) => <TextField {...params} label="Movie" />}
/>
<Autocomplete
options={top100Films.map((option) => option.title)}
freeSolo
renderValue={(value, getItemProps) => (
<Chip label={value} {...getItemProps()} />
)}
renderInput={(params) => <TextField {...params} label="freeSolo" />}
/>