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
34d81a57
Commit
34d81a57
authored
Dec 19, 2015
by
xwenliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support abreast wheels
parent
01290c20
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
361 additions
and
33 deletions
+361
-33
README.md
README.md
+66
-1
index.js
index.js
+294
-31
package.json
package.json
+1
-1
No files found.
README.md
View file @
34d81a57
...
...
@@ -17,6 +17,9 @@ Needs react-native >= 0.14.2
-
<b>
selectedValue
</b>
any
-
<b>
onPickerDone
</b>
function
####Methods
-
<b>
toggle
</b>
show or hide picker, default to be hiden
###Usage
####Step 1 - install
...
...
@@ -38,4 +41,66 @@ Needs react-native >= 0.14.2
selectedValue
=
{}
//default to be selected value
onPickerDone
=
{}
//when confirm your choice
/>
```
\ No newline at end of file
```
###Notice
####support two modes:
<b>
1. parallel: such as time picker, wheels have no connection with each other
</b>
<b>
2. cascade: such as date picker, address picker .etc, when front wheel changed, the behind wheels will all be reset
</b>
####parallel:
-
single wheel:
```
javascript
pickerData
=
[
1
,
2
,
3
,
4
];
selectedValue
=
3
;
```
-
two or more wheel:
```
javascript
pickerData
=
[
[
1
,
2
,
3
,
4
],
[
5
,
6
,
7
,
8
],
...
];
selectedValue
=
[
1
,
5
];
```
####cascade:
-
two wheel
```
javascript
pickerData
=
{
{
a
:
[
1
,
2
,
3
,
4
],
b
:
[
5
,
6
,
7
,
8
],
...
}
};
selectedValue
=
[
'
a
'
,
2
];
```
-
three wheel
```
javascript
pickerData
=
{
a
:
{
a1
:
[
1
,
2
,
3
,
4
],
a2
:
[
5
,
6
,
7
,
8
],
a3
:
[
9
,
10
,
11
,
12
]
},
b
:
{
b1
:
[
1
,
2
,
3
,
4
],
b2
:
[
5
,
6
,
7
,
8
],
b3
:
[
9
,
10
,
12
,
12
]
}
...
};
selectedValue
=
[
'
a
'
,
'
a1
'
,
1
];
```
index.js
View file @
34d81a57
This diff is collapsed.
Click to expand it.
package.json
View file @
34d81a57
{
"name"
:
"react-native-picker"
,
"version"
:
"0.
1.2
"
,
"version"
:
"0.
2.0
"
,
"description"
:
"react-native-picker"
,
"main"
:
"index.js"
,
"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