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
ccb3145a
Commit
ccb3145a
authored
Apr 26, 2018
by
Andrea Ascari
Committed by
zooble
Apr 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made callback for isPickerShow optional (#296)
parent
358d080a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
69 deletions
+69
-69
index.d.ts
index.d.ts
+67
-67
index.js
index.js
+2
-2
No files found.
index.d.ts
View file @
ccb3145a
...
...
@@ -5,15 +5,15 @@
/**
* Options to create a picker object
*
*
* @interface PickerOptions
*/
interface
PickerOptions
{
/**
* Items to be passed into the picker
*
*
* Default is an empty array
*
*
* @type {any[]}
* @memberof PickerOptions
*/
...
...
@@ -21,12 +21,12 @@ interface PickerOptions {
/**
* The selected item in the picker
*
*
* Accepts the item in an array
* Example: ['selected']
*
*
* Default is an empty array
*
*
* @type {any[]}
* @memberof PickerOptions
*/
...
...
@@ -34,9 +34,9 @@ interface PickerOptions {
/**
* Title text shown at the top of the picker
*
*
* Default value is 'pls select'
*
*
* @type {string}
* @memberof PickerOptions
*/
...
...
@@ -44,9 +44,9 @@ interface PickerOptions {
/**
* Text for the confirm button
*
*
* Default value is 'confirm'
*
*
* @type {string}
* @memberof PickerOptions
*/
...
...
@@ -54,9 +54,9 @@ interface PickerOptions {
/**
* Text for the cancel button
*
*
* Default value is 'cancel'
*
*
* @type {string}
* @memberof PickerOptions
*/
...
...
@@ -64,12 +64,12 @@ interface PickerOptions {
/**
* The color of the text for the confirm button
*
*
* Accepts rgba values as an array
* [R, G, B, A]
*
*
* Default is [1, 186, 245, 1]
*
*
* @type {number[]}
* @memberof PickerOptions
*/
...
...
@@ -77,12 +77,12 @@ interface PickerOptions {
/**
* The color of the text for the cancel button
*
*
* Accepts rgba values as an array
* [R, G, B, A]
*
*
* Default is [1, 186, 245, 1]
*
*
* @type {number[]}
* @memberof PickerOptions
*/
...
...
@@ -90,12 +90,12 @@ interface PickerOptions {
/**
* The color of the Title text
*
*
* Accepts rgba values as an array
* [R, G, B, A]
*
*
* Default is [20, 20, 20, 1]
*
*
* @type {number[]}
* @memberof PickerOptions
*/
...
...
@@ -103,12 +103,12 @@ interface PickerOptions {
/**
* The background color of the toobar
*
*
* Accepts rgba values as an array
* [R, G, B, A]
*
*
* Default is [232, 232, 232, 1]
*
*
* @type {number[]}
* @memberof PickerOptions
*/
...
...
@@ -116,12 +116,12 @@ interface PickerOptions {
/**
* Background color of the picker
*
*
* Accepts rgba values as an array
* [R, G, B, A]
*
*
* Default is [196, 199, 206, 1]
*
*
* @type {number[]}
* @memberof PickerOptions
*/
...
...
@@ -130,9 +130,9 @@ interface PickerOptions {
/**
* Font size of the items in the toolbar
*
*
* Default is 16
*
*
* @type {number}
* @memberof PickerOptions
*/
...
...
@@ -140,9 +140,9 @@ interface PickerOptions {
/**
* Font size of the items in the picker
*
*
* Default is 16
*
*
* @type {number}
* @memberof PickerOptions
*/
...
...
@@ -150,9 +150,9 @@ interface PickerOptions {
/**
* Row height of the items in the picker
*
*
* Default is 24
*
*
* @type {number}
* @memberof PickerOptions
*/
...
...
@@ -160,12 +160,12 @@ interface PickerOptions {
/**
* Color of the text for the items in the picker
*
*
* Accepts rgba values as an array
* [R, G, B, A]
*
*
* Default is [31, 31, 31, 1]
*
*
* @type {number[]}
* @memberof PickerOptions
*/
...
...
@@ -173,22 +173,22 @@ interface PickerOptions {
/**
* Event fired when user confirms the picker
*
*
* Returns the selected item
*
* @param {any[]} item
*
*
* @param {any[]} item
*
* @memberof PickerOptions
*/
onPickerConfirm
?(
item
:
any
[]):
void
/**
* Event fired when user cancels the picker
*
*
* Returns the selected item
*
* @param {any[]} item
*
*
* @param {any[]} item
*
* @memberof PickerOptions
*/
onPickerCancel
?(
item
:
any
[]):
void
...
...
@@ -196,11 +196,11 @@ interface PickerOptions {
/**
* Event fired when user scrolls over or selects a value in the picker
*
*
* Returns the selected item
*
* @param {any[]} item
*
*
* @param {any[]} item
*
* @memberof PickerOptions
*/
onPickerSelect
?(
item
:
any
[]):
void
...
...
@@ -210,61 +210,61 @@ interface PickerOptions {
export
default
class
Picker
{
/**
* Creates a new Picker objects
*
*
* @static
* @param {PickerOptions} options
*
* @param {PickerOptions} options
*
* @memberof Picker
*/
static
init
(
options
:
PickerOptions
):
void
/**
* Shows the picker
*
*
* @static
*
*
* @memberof Picker
*/
static
show
():
void
/**
* Hides the picker
*
*
* @static
*
*
* @memberof Picker
*/
static
hide
():
void
/**
* Toggles the visibility of the picker
*
*
* @static
*
*
* @memberof Picker
*/
static
toggle
():
void
/**
* Sets an item in the picker as the selected value
*
*
* Accepts the item in an array
* Example: ['selected']
*
*
* @static
* @param {any[]} item
*
* @param {any[]} item
*
* @memberof Picker
*/
static
select
(
item
:
any
[]):
void
/**
* Checks if the picker is showing currently
*
*
* @static
* @returns {boolean}
*
* @returns {boolean}
*
* @memberof Picker
*/
static
isPickerShow
():
boolean
}
\ No newline at end of file
static
isPickerShow
(
fn
?:
(
err
:
any
,
message
:
any
)
=>
void
):
boolean
}
index.js
View file @
ccb3145a
...
...
@@ -91,7 +91,7 @@ export default {
else
if
(
ios
){
returnValue
=
!
err
;
}
fn
(
returnValue
);
fn
&&
fn
(
returnValue
);
});
}
};
\ No newline at end of file
};
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