react-native-select-dropdown-customized
"react-native-select-dropdown-customized" is a customized library based on "react-native-select-dropdown",
providing the "renderEmptyCustomizedRowChild" prop when the dropdown search results are empty.
Installation
# Using npm
npm install react-native-select-dropdown-customized
# Using yarn
yarn add react-native-select-dropdown-customized
Props
Methods
data
array of data that will be represented in dropdown 'can be array of objects
onSelect
function recieves selected item and its index in data array
defaultButtonText
default button text when no item is selected
buttonTextAfterSelection
function recieves selected item and its index, this function should return a string that will be represented in button after item is selected
Type | Required |
---|
function | Yes "unless you customized button using renderCustomizedButtonChild" |
rowTextForSelection
function recieves item and index for each row in dropdown, this function shoud return a string that will be represented in each row in dropdown
Type | Required |
---|
function | Yes "unless you customized button using renderCustomizedRowChild" |
defaultValue
default selected item in dropdown ( check examples in Demo1)
defaultValueByIndex
default selected item index
disabled
disable dropdown
disableAutoScroll
disable auto scroll to selected value
disabledIndexs
disable choose all Rows index in the list
onFocus
function fires when dropdown is opened
onBlur
function fires when dropdown is closed
onScrollEndReached
function fires when dropdown scrolls to the end (for paginations)
buttonStyle
style object for button
buttonTextStyle
style object for button text
renderCustomizedButtonChild
function recieves selected item and its index, this function should return a React component as a child for dropdown button buttonStyle
should be used for parent button view style.
# check examples folder to make things clear
renderDropdownIcon
function that should return a React component for dropdown icon
dropdownIconPosition
dropdown icon position "left" || "right"
statusBarTranslucent
required to set true when statusbar is translucent (android only)
dropdownStyle
style object for dropdown view
dropdownOverlayColor
backdrop color when dropdown is opened
showsVerticalScrollIndicator
When true, shows a vertical scroll indicator.
rowStyle
style object for row
rowTextStyle
style object for row text
selectedRowStyle
style object for selected row
selectedRowTextStyle
style object for selected row text
renderCustomizedRowChild
function recieves item and its index, this function should return React component as a child for customized row rowStyle
should be used for parent row view style.
# check examples folder to make things clear
renderEmptyCustomizedRowChild
This function should return React component as a child for customized row rowStyle
should be used for parent row view style.
search
enable search functionality
searchInputStyle
style object for search input
searchInputTxtColor
text color for search input
searchInputTxtStyle
style object for search input text
searchPlaceHolder
placeholder text for search input
searchPlaceHolderColor
text color for search input placeholder
renderSearchInputLeftIcon
function returns React component for search input icon
renderSearchInputRightIcon
function returns React component for search input icon
onChangeSearchInputText
function callback when the search input text changes, this will automatically disable the dropdown's internal search to be implemented manually outside the component
License
MIT
Version notes
Hot fix: index.d.ts
Update Readme.
Change library registry. Change visibility into public.
Add renderEmptyCustomizedRowChild for custom empty row child component.
Add text component ("NO RESULT") when dropdown searching keywords are not working.