react-native-reusables icon indicating copy to clipboard operation
react-native-reusables copied to clipboard

How to open select menu programmatically?

Open useEffects opened this issue 1 year ago • 1 comments
trafficstars

 <Select defaultValue={{ value: 'apple', label: 'Apple' }} open={true}>

i can also confirm open doesnt seem to do anything, but setting open={false} would disable the functionality. Also defaultOpen doesnt seem to do anything

useEffects avatar May 22 '24 22:05 useEffects

couldnt open the dropdown menu as well with the open prop

useEffects avatar May 25 '24 05:05 useEffects

@useEffects Unfortunately it is not possible at the moment. It slipped my attention. The reason is that components like Select and Dropdown's position on the screen is calculated on press.

What is your exact use case for opening the menus programmatically?

mrzachnugent avatar May 31 '24 19:05 mrzachnugent

I was trying to create an AutoSelect component using the existing ui, but seems like i cant atm

useEffects avatar Jun 05 '24 21:06 useEffects

@useEffects I just updated the ui and primitive components like Select and Dropdown Menu. Once you update your components, you can follow the instructions here: https://rnr-docs.vercel.app/getting-started/common-patterns/#programmatically-showing-and-hiding-components.

If you run into another issue, please open a new one. Thanks!

mrzachnugent avatar Jun 06 '24 17:06 mrzachnugent