Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-picker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
react-native-picker
Commits
e2a805e8
Commit
e2a805e8
authored
Jan 07, 2016
by
xwenliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.2.10
parent
1b7e249c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
index.js
index.js
+12
-3
package.json
package.json
+1
-1
No files found.
index.js
View file @
e2a805e8
...
@@ -58,9 +58,18 @@ export default class PickerAny extends React.Component {
...
@@ -58,9 +58,18 @@ export default class PickerAny extends React.Component {
this
.
setState
(
newState
);
this
.
setState
(
newState
);
}
}
shouldComponentUpdate
(
props
,
state
,
context
){
//todo
return
JSON
.
stringify
([
props
,
state
,
context
])
!==
JSON
.
stringify
([
this
.
props
,
this
.
state
,
this
.
context
]);
/*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
){
_getStateFromProps
(
props
){
//the pickedValue must looks like [wheelone's, wheeltwo's, ...]
//the pickedValue must looks like [wheelone's, wheeltwo's, ...]
...
...
package.json
View file @
e2a805e8
{
{
"name"
:
"react-native-picker"
,
"name"
:
"react-native-picker"
,
"version"
:
"0.2.
9
"
,
"version"
:
"0.2.
10
"
,
"description"
:
"react-native-picker"
,
"description"
:
"react-native-picker"
,
"main"
:
"index.js"
,
"main"
:
"index.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment