How can I add unique keys to React/MUI Autocomplete component?
You can define your own renderOption that can return the list item with a correct key value. Your code complains about the duplicated keys because by default, Autocomplete uses the getOptionLabel(option) to retrieve the key: <Autocomplete renderOption={(props, option) => { return ( <li {…props} key={option.id}> {option.name} </li> ); }} renderInput={(params) => <TextField {…params} label=”Movie” />} … Read more