react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

useSelect example typescript support

Open Sxoo opened this issue 9 months ago • 0 comments

🙋 Documentation Request

https://react-spectrum.adobe.com/react-aria/useSelect.html#example

I am trying to use the example Select implementation together with a ListBox, Popover and Options but it seems that only a Popover is typed out of the box. I was wondering maybe an example of types could be provided to type out these components more easily?

The main problem occurs when I am trying to type out the Select props, I can't seem to type out the options in such a way that my onSelectionChange would not be a generic (key: Key) => any and I wouldn't need to type cast.

What am I missing?

🧢 Your Company/Team

No response

Sxoo avatar May 22 '24 07:05 Sxoo