react-native-picker-select
Advanced tools
Comparing version 3.1.2 to 3.1.3
{ | ||
"name": "react-native-picker-select", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": | ||
@@ -5,0 +5,0 @@ "A Picker component for React Native which emulates the native <select> interfaces for each platform", |
@@ -37,3 +37,4 @@ import React, { PureComponent } from 'react'; | ||
// update selectedItem if value prop is defined and differs from currently selected item | ||
const newSelectedItem = getSelectedItem({ items: nextProps.items, value: nextProps.value }); | ||
const newItems = handlePlaceholder({ placeholder: nextProps.placeholder }).concat(nextProps.items); | ||
const newSelectedItem = getSelectedItem({ items: newItems, value: nextProps.value }); | ||
const selectedItemChanged = | ||
@@ -46,5 +47,3 @@ !isEqual(nextProps.value, undefined) && | ||
items: itemsChanged | ||
? handlePlaceholder({ placeholder: nextProps.placeholder }).concat( | ||
nextProps.items | ||
) | ||
? newItems | ||
: prevState.items, | ||
@@ -203,6 +202,10 @@ selectedItem: selectedItemChanged ? newSelectedItem : prevState.selectedItem, | ||
if (this.props.children) { | ||
return <View pointerEvents="box-only">{this.props.children}</View>; | ||
return ( | ||
<View pointerEvents="box-only" style={this.props.style.inputIOSContainer}> | ||
{this.props.children} | ||
</View> | ||
); | ||
} | ||
return ( | ||
<View pointerEvents="box-only"> | ||
<View pointerEvents="box-only" style={this.props.style.inputIOSContainer}> | ||
<TextInput | ||
@@ -209,0 +212,0 @@ style={[ |
22910
388