danish1658 / react-native-dropdown-select-list

☝️ React Native Select List Equivalent to Html's Select with options"
https://www.npmjs.com/package/react-native-dropdown-select-list
MIT License
200 stars 89 forks source link

How to tell if dropdown is expanded or not #43

Closed Jake-Mulhern closed 1 year ago

Jake-Mulhern commented 1 year ago

I have some other components on the screen that will need to react to the dropdown opening. Is there a function that can be run when the dropdown opens or something similar?

danish1658 commented 1 year ago

dropdownShown={true}

Instead of true use a variable and execute your function when it has a truthy value

vorlovsky commented 1 year ago

@danish1658 but I can't find where does your component updates this prop value. Seems like it's just an immutable prop that can't be normally used from outside of the component.

Of course, to add proper callback and to patch the package wouldn't be a problem, but IMO this is a common feature that most of the users will expect to be implemented.

Jonak-Adipta-Kalita commented 1 year ago

yup, I also want this functionality! I can create a PR if you want!