Add selectItem method
Description of the PR
This Pull Request adds the selectItem method to the list of methods accessible from the ref of the component.
This modification allows developers to change the selected value of the selector component from outside the component.
Purpose
I'm bringing this method because I'm in a situation where I need to set a value for this selector from outside the selector. And I think adding it from the ref would be much easier.
I look forward to reading your thoughts on whether this feature helps, or how to improve this feature.
Regards!
Closes #71.
Hi, how can i set "buttonTextAfterSelection" externally in Select Dropdown? I mean i can correctly set selectItem externally but then the text of the button is empty.
Thank you :)
Hi @sbozzella. I've been searching and currently there is no feature that can achieve that 😥.
You can select an item from outside the component using ref.current.selectIndex(index) it's added in v3.0.0
https://github.com/AdelRedaa97/react-native-select-dropdown/issues/71
Awesome. Thanks @AdelRedaa97! 👏