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
b60ed592
Commit
b60ed592
authored
Dec 29, 2015
by
Zuxuan Liang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug
缺少定义,在类型为cascade时会报错
parent
a5986f88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
index.js
index.js
+2
-1
No files found.
index.js
View file @
b60ed592
...
...
@@ -68,6 +68,7 @@ export default class PickerAny extends React.Component {
let
pickerStyle
=
pickerData
.
constructor
===
Array
?
'
parallel
'
:
'
cascade
'
;
let
firstWheelData
;
let
firstPickedData
;
let
secondPickedData
;
let
secondWheelData
;
let
secondPickedDataIndex
;
let
thirdWheelData
;
...
...
@@ -298,7 +299,7 @@ export default class PickerAny extends React.Component {
selectedValue
=
{
me
.
state
.
firstPickedData
}
onValueChange
=
{
value
=>
{
let
secondWheelData
=
Object
.
keys
(
pickerData
[
value
]);
cascadeData
=
me
.
_getCascadeData
(
pickerData
,
me
.
pickedValue
,
value
,
secondWheelData
[
0
]);
let
cascadeData
=
me
.
_getCascadeData
(
pickerData
,
me
.
pickedValue
,
value
,
secondWheelData
[
0
]);
//when onPicked, this.pickedValue will pass to the parent
//when firstWheel changed, second and third will also change
if
(
cascadeData
.
thirdWheelData
){
...
...
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