'MUI AutoComplete cross clear

When i click on the cross for clear the field i got this error : Cannot read property 'name' of null and i have test a lot of things but no one works ... Thanks !

Is my component

export default function ComboBox({ value, onChange }) {
  return (
    <Autocomplete
      disablePortal
      inputValue={value}
      onChange={onChange}
      id="combo-color"
      options={colors}
      sx={{ width: 330 }}
      renderInput={(params) => <TextField {...params} label="Colors" />}
    />
  );
}
const colors = [
  { label: "Green", value: "Green" },
  { label: "Blue", value: "Blue" },
  { label: "Red", value: "Red" },
  { label: "Black", value: "Black" },
  { label: "Yellow", value: "Yellow" },
];

Is my input

InputColors
sx={{ width: 330 }}
value={colors}
required
type="text"
onChange={(e, options) =>  setColors(options.value)}
 />

https://i.stack.imgur.com/MPa3D.png



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source