How can I add key element to react-select with ismulti, so when I select multiple options it doesn't give me this error "Warning: Encountered two children with the same key, [object Object]. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version."
here is my code:
let options = data.map( (item,index) => (
{ index: item.name, value: item, label: item.name })
);
setOptions(options);
in the return part here is how I'm setting the react-select
<Select
value={selectedOptions || ''}
className="select-name"
isMulti
name="selectedOption"
onChange={handleChange}
isClearable
options={Options}
/>
Thanks in advance for your help.