I have a Autocomplete multiple select element. When I click on cross, to delete some option, I want to get this value. I tried to use ChipProps = {{onDelete: some function}} but it did not work :( I get undefined, and more over, delete function stops to work at all.
Here is my code
const top100Films = [
{ title: 'The Shawshank Redemption', year: 1994 },
{ title: 'The Godfather', year: 1972 },
{ title: 'The Godfather: Part II', year: 1974 },
{ title: 'The Dark Knight', year: 2008 },
{ title: '12 Angry Men', year: 1957 },
{ title: "Schindler's List", year: 1993 },
];
<Autocomplete
multiple
id="tags-standard1"
options={top100Films}
getOptionLabel={(option) => option.title}
//ChipProps = {{onDelete: (option) => {console.log(option.title)}}}
renderInput={(params) => (
<TextField
{...params}
size="small"
variant="outlined"
label="Films"
/>
)}
/>
So could anybody tell me how to get Id, or value, of deleted option?