File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ declare module 'react-native-dropdown-picker' {
197197 containerStyle ?: StyleProp < ViewStyle > ;
198198 customItemContainerStyle ?: StyleProp < ViewStyle > ;
199199 customItemLabelStyle ?: StyleProp < TextStyle > ;
200+ customItemValueDelimiter ?: string ;
200201 disableBorderRadius ?: boolean ;
201202 disabledItemContainerStyle ?: StyleProp < ViewStyle > ;
202203 disabledItemLabelStyle ?: StyleProp < TextStyle > ;
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ function Picker({
8383 containerStyle = { } ,
8484 customItemContainerStyle = { } ,
8585 customItemLabelStyle = { } ,
86+ customItemValueDelimiter = '-' ,
8687 disableBorderRadius = true ,
8788 disabled = false ,
8889 disabledItemContainerStyle = { } ,
@@ -541,7 +542,7 @@ function Picker({
541542 ) {
542543 results . push ( {
543544 [ ITEM_SCHEMA . label ] : searchText ,
544- [ ITEM_SCHEMA . value ] : searchText . replace ( ' ' , '-' ) ,
545+ [ ITEM_SCHEMA . value ] : customItemValueDelimiter ? searchText . replaceAll ( ' ' , customItemValueDelimiter ) : searchText ,
545546 custom : true ,
546547 } ) ;
547548 }
You can’t perform that action at this time.
0 commit comments