Skip to content

Commit e2a805e

Browse files
committed
0.2.10
1 parent 1b7e249 commit e2a805e

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

index.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,18 @@ export default class PickerAny extends React.Component {
5858
this.setState(newState);
5959
}
6060

61-
shouldComponentUpdate(props, state, context){
62-
return JSON.stringify([props, state, context]) !== JSON.stringify([this.props, this.state, this.context]);
63-
}
61+
//todo
62+
/*shouldComponentUpdate(props, state, context){
63+
let newProps = Object.assign({}, props);
64+
let newState = Object.assign({}, state);
65+
let oldProps = Object.assign({}, this.props);
66+
let oldState = Object.assign({}, this.state);
67+
let arr = [newProps, newState, oldProps, oldState];
68+
for(let i in arr){
69+
delete arr[i].slideAnim;
70+
}
71+
return JSON.stringify([newProps, newState, context]) !== JSON.stringify([oldProps, oldState, this.context]);
72+
}*/
6473

6574
_getStateFromProps(props){
6675
//the pickedValue must looks like [wheelone's, wheeltwo's, ...]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-picker",
3-
"version": "0.2.9",
3+
"version": "0.2.10",
44
"description": "react-native-picker",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)