From e2a805e8263a9aa29eb1628d761db404c6a62f90 Mon Sep 17 00:00:00 2001 From: xwenliang Date: Thu, 7 Jan 2016 15:35:47 +0800 Subject: [PATCH] 0.2.10 --- index.js | 15 ++++++++++++--- package.json | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 98397b3c7..00a1e0b6b 100644 --- a/index.js +++ b/index.js @@ -58,9 +58,18 @@ export default class PickerAny extends React.Component { this.setState(newState); } - shouldComponentUpdate(props, state, context){ - return JSON.stringify([props, state, context]) !== JSON.stringify([this.props, this.state, this.context]); - } + //todo + /*shouldComponentUpdate(props, state, context){ + let newProps = Object.assign({}, props); + let newState = Object.assign({}, state); + let oldProps = Object.assign({}, this.props); + let oldState = Object.assign({}, this.state); + let arr = [newProps, newState, oldProps, oldState]; + for(let i in arr){ + delete arr[i].slideAnim; + } + return JSON.stringify([newProps, newState, context]) !== JSON.stringify([oldProps, oldState, this.context]); + }*/ _getStateFromProps(props){ //the pickedValue must looks like [wheelone's, wheeltwo's, ...] diff --git a/package.json b/package.json index ce94eab86..1635d4333 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-picker", - "version": "0.2.9", + "version": "0.2.10", "description": "react-native-picker", "main": "index.js", "scripts": {