Picker

Picker Component, support single or multiple selection, blurModel and nativePicker

PROPS

namedescriptiontypedefault
valuePicker current value in the shape of {value: ..., label: ...}, for custom shape use 'getItemValue' propunion
onChangeCallback for when picker value changefunc
modeSINGLE mode or MULTI modeenum'SINGLE'
enableModalBlurAdds blur effect to picker modal (iOS only)bool
renderPickerRender custom pickerfunc
renderItemRender custom picker itemfunc
customPickerPropsCustom picker props (when using renderPicker, will apply on the button wrapper)object
onPressAdd onPress callback for when pressing the pickerfunc
getItemValueA function that extract the unique value out of the value prop in case value has a custom structurefunc
getLabelA function that returns the label to show for the selected Picker valuefunc
topBarPropsThe picker modal top bar propsshape
showSearchShow search input to filter picker items by labelbool
searchStyleStyle object for the search input (only when passing showSearch)shape
searchPlaceholderPlaceholder text for the search input (only when passing showSearch)string
onSearchChangecallback for picker modal search input text change (only when passing showSearch)func
renderCustomSearchRender custom search input (only when passing showSearch)func
useNativePickerAllow to use the native picker solution (different style for iOS and Android)bool
renderNativePickerCallback for rendering a custom native picker inside the dialog (relevant to native picker only)func
listPropsPass props to the list component that wraps the picker options (allows to control FlatList behavior)object

LIVE EXAMPLE

CODE SAMPLE

See example here.