This pull request improves autocomplete type safety.
The way it works now is that if the options are different from an array of strings then optionLabel is required. Typescript does not inform the user of this and the only feedback you get is a thrown error when you try and open the dropdown.
This PR makes it so that the optionLabel is optional if the options is an array of string, if not optionLabel becomes required.
This pull request improves autocomplete type safety. The way it works now is that if the options are different from an array of strings then
optionLabel
is required. Typescript does not inform the user of this and the only feedback you get is a thrown error when you try and open the dropdown.This PR makes it so that the
optionLabel
is optional if the options is an array of string, if notoptionLabel
becomes required.