How do I controll a NextUI Autocomplete Component?

49 views Asked by At

I'm following the instructions from the "Controlled" section here. However, the selected key that I pass through is not being selected. I am just taking the value the component passes to onSelectionChange and using it unchanged for the selectedKey property.

I've noticed that for the similar Select component, this strategy does work, and also the value of selectedKey in onSelectionChange is not a String, but rather a Set. It seems to me that these two selectedKey values should both be of the same type, and that ideally they would both work as String values so that I could easily set an initial value

Has anyone else run into this issue? Any advice on how I might get this to work?

0

There are 0 answers