The onSelect -callback should receive key: string instead of option: {key: string, label: string} according to your documentation. However, it still receives the option instead of the key. This results to typescript issues when trying to refer to the key as key.key and the label as key.label. Likewise, if trying to fix the props type to be the type of option, it says the props should be string, even while it actually is not.
The onSelect -callback should receive key: string instead of option: {key: string, label: string} according to your documentation. However, it still receives the option instead of the key. This results to typescript issues when trying to refer to the key as key.key and the label as key.label. Likewise, if trying to fix the props type to be the type of option, it says the props should be string, even while it actually is not.