1

Now, I'm faced to a lot of waring message caused by my component. As you seen in the title, "Warning: Encountered two children with the same key, 'Device 846' " is printed in console log.

<Autocomplete
  multiple
  id="tags-standard"
  options={test}
  size="small"
  style={{ width: 180 }}
  getOptionLabel={(option) => option.title}
  renderInput={(params) => (
    <TextField {...params} variant="outlined" label="Device" />
  )}
  onChange={(object, value) => console.log(value)}
/>

This is my component settings and then the dataset of test is in here.

[{title:"Device-1", id:1},{title:"Device-2", id:2},...,{title:"Device-846", id:846}]

Now I'm working on React.js Please, let me know the solution.

0 Answers0