rmc-picker
Advanced tools
Comparing version 3.9.3 to 3.9.4
@@ -22,5 +22,2 @@ import React from 'react'; | ||
}, | ||
item: { | ||
height: 36 | ||
}, | ||
itemText: { | ||
@@ -127,9 +124,10 @@ fontSize: 20, | ||
var items = React.Children.map(children, function (item, index) { | ||
var totalStyle = [itemStyle, styles.itemText]; | ||
var totalStyle = [styles.itemText]; | ||
if (selectedValue === item.props.value) { | ||
totalStyle.push(styles.selectedItemText); | ||
} | ||
totalStyle.push(itemStyle); | ||
return React.createElement( | ||
View, | ||
{ style: styles.item, ref: 'item' + index, onLayout: index === 0 ? _this3.onItemLayout : undefined, key: item.key }, | ||
{ ref: 'item' + index, onLayout: index === 0 ? _this3.onItemLayout : undefined, key: item.key }, | ||
React.createElement( | ||
@@ -136,0 +134,0 @@ Text, |
@@ -11,2 +11,3 @@ export interface IPickerItem { | ||
onValueChange?: (value: any) => void; | ||
itemStyle?: any; | ||
/** web only */ | ||
@@ -16,5 +17,3 @@ prefixCls?: string; | ||
className?: string; | ||
/** web only */ | ||
defaultSelectedValue?: any; | ||
itemStyle?: any; | ||
} |
@@ -37,5 +37,2 @@ 'use strict'; | ||
}, | ||
item: { | ||
height: 36 | ||
}, | ||
itemText: { | ||
@@ -142,9 +139,10 @@ fontSize: 20, | ||
var items = _react2['default'].Children.map(children, function (item, index) { | ||
var totalStyle = [itemStyle, styles.itemText]; | ||
var totalStyle = [styles.itemText]; | ||
if (selectedValue === item.props.value) { | ||
totalStyle.push(styles.selectedItemText); | ||
} | ||
totalStyle.push(itemStyle); | ||
return _react2['default'].createElement( | ||
_reactNative.View, | ||
{ style: styles.item, ref: 'item' + index, onLayout: index === 0 ? _this3.onItemLayout : undefined, key: item.key }, | ||
{ ref: 'item' + index, onLayout: index === 0 ? _this3.onItemLayout : undefined, key: item.key }, | ||
_react2['default'].createElement( | ||
@@ -151,0 +149,0 @@ _reactNative.Text, |
@@ -11,2 +11,3 @@ export interface IPickerItem { | ||
onValueChange?: (value: any) => void; | ||
itemStyle?: any; | ||
/** web only */ | ||
@@ -16,5 +17,3 @@ prefixCls?: string; | ||
className?: string; | ||
/** web only */ | ||
defaultSelectedValue?: any; | ||
itemStyle?: any; | ||
} |
{ | ||
"name": "rmc-picker", | ||
"version": "3.9.3", | ||
"version": "3.9.4", | ||
"description": "React Mobile Picker Component(web and react-native)", | ||
@@ -12,6 +12,2 @@ "keywords": [ | ||
"homepage": "https://github.com/react-component/m-picker", | ||
"maitainers": [ | ||
"yiminghe@gmail.com", | ||
"hualei5280@gmail.com" | ||
], | ||
"repository": { | ||
@@ -18,0 +14,0 @@ "type": "git", |
83913
2312