react-native-select-dropdown
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -19,10 +19,2 @@ import type * as React from "react"; | ||
/** | ||
* function recieves selected item and its index, this function should return a string that will be represented in button after item is selected | ||
*/ | ||
buttonTextAfterSelection: (selectedItem: any, index: number) => string; | ||
/** | ||
* 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 | ||
*/ | ||
rowTextForSelection: (item: any, index: number) => string; | ||
/** | ||
* default selected item in dropdown | ||
@@ -64,6 +56,2 @@ */ | ||
/** | ||
* 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. | ||
*/ | ||
renderCustomizedButtonChild?: (selectedItem: any, index: number) => React.ReactNode; | ||
/** | ||
* function that should return a React component for dropdown icon | ||
@@ -105,6 +93,2 @@ */ | ||
/** | ||
* 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. | ||
*/ | ||
renderCustomizedRowChild?: (selectedItem: any, index: number, isSelected?: boolean) => React.ReactNode; | ||
/** | ||
* enable search functionality | ||
@@ -121,2 +105,6 @@ */ | ||
searchInputTxtColor?: string; | ||
/** | ||
* text style for search input | ||
*/ | ||
searchInputTxtStyle?: StyleProp<TextStyle>; | ||
/** | ||
@@ -138,3 +126,27 @@ * placeholder text for search input | ||
renderSearchInputRightIcon?: (selectedItem: any, index: number) => React.ReactNode; | ||
}; | ||
} & ( | ||
{ | ||
/** | ||
* function recieves selected item and its index, this function should return a string that will be represented in button after item is selected | ||
*/ | ||
buttonTextAfterSelection: (selectedItem: any, index: number) => string; | ||
} | { | ||
/** | ||
* 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. | ||
*/ | ||
renderCustomizedButtonChild?: (selectedItem: any, index: number) => React.ReactNode; | ||
} | ||
) & ( | ||
{ | ||
/** | ||
* 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 | ||
*/ | ||
rowTextForSelection: (item: any, index: number) => string; | ||
} | { | ||
/** | ||
* 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. | ||
*/ | ||
renderCustomizedRowChild?: (selectedItem: any, index: number, isSelected?: boolean) => React.ReactNode; | ||
} | ||
); | ||
@@ -141,0 +153,0 @@ export default class SelectDropdown extends React.Component<SelectDropdownProps> { |
{ | ||
"name": "react-native-select-dropdown", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "react-native-select-dropdown is a highly customized dropdown | select | picker | menu for react native that works for andriod and iOS platforms.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,2 +11,3 @@ import React from 'react'; | ||
inputStyle, | ||
inputTextStyle, | ||
value, | ||
@@ -28,2 +29,3 @@ valueColor, | ||
inputStyle: inputStyle, | ||
inputTextStyle: inputTextStyle, | ||
value: value ?? '', | ||
@@ -71,3 +73,3 @@ valueColor: valueColor ?? '#000000', | ||
// | ||
style={{...styles.inputField, color: defaults.valueColor}} | ||
style={{...styles.inputField, color: defaults.valueColor, ...defaults.inputTextStyle}} | ||
returnKeyType={'done'} | ||
@@ -74,0 +76,0 @@ textContentType={'oneTimeCode'} |
@@ -48,2 +48,3 @@ import React, {forwardRef, useImperativeHandle} from 'react'; | ||
searchInputTxtColor /* text color for search input */, | ||
searchInputTxtStyle /* text style for search input */, | ||
searchPlaceHolder /* placeholder text for search input */, | ||
@@ -135,2 +136,3 @@ searchPlaceHolderColor /* text color for search input placeholder */, | ||
inputStyle={searchInputStyle} | ||
inputTextStyle={searchInputTxtStyle} | ||
renderLeft={renderSearchInputLeftIcon} | ||
@@ -137,0 +139,0 @@ renderRight={renderSearchInputRightIcon} |
38677
848