GeekyAnts / NativeBase

Mobile-first, accessible components for React Native & Web to build consistent UI across Android, iOS and Web.
https://nativebase.io/
MIT License
20.16k stars 2.38k forks source link

How to Call Function onOpen of Select Component?? #4166

Closed jaferi512 closed 2 years ago

jaferi512 commented 2 years ago

Environment Setup: RN: 0.65 Native Base: 3.1.0

Feature Required: I want to Call a Function When we Click the Select Component to Open it because I want to fill the select.items by getting values from my restful api. I've not found something like that to detect the onOpen or something like that. Is there anything like that available then let me know otherwise try to implement this feature in your Select Component because this feature is needed by most of the developers to complete their Features in the complex projects. My Code Looks Like That: <Select selectedValue={field.value} width={'95%'} dropdownIcon={ <Icon2 style={{marginRight: 8}} name="down" size={15} /> } placeholder={field.name} onValueChange={itemValue => field.onChange(itemValue)} _selectedItem={{ bg: 'white', _text: {color: 'black'}, endIcon: , }}> {combo && combo.map(function (ok, i) { return ; })} I'll wait for your Response because I really need this feature to implement my ERP Solution using Mobile Applications. Thanks in Advance.

surajahmed commented 2 years ago

@jaferi512 Support for onOpen and onClose props have been added to Select component in version 3.3.0.