You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unit Tests - [](https://circleci.com/gh/lawnstarter/react-native-picker-select)
15
-
16
16
## Getting Started
17
17
18
18
### Installing
@@ -21,37 +21,37 @@ Unit Tests - [ does not include it. | N | iOS |
40
-
| hideIcon | boolean | Hides the floating downward arrow on the right side of the input box | N | iOS |
41
-
| onUpArrow / onDownArrow | function |* Presence enables the corresponding arrow<br>* Closes the picker<br>* Calls the callback provided| N | iOS |
31
+
| Name | Type | Description | Required? | iOS / Android |
| onValueChange | function | Callback which returns `value, index`| Y | Both |
34
+
| items | array |_ The items for the component to render. Each item should be in the following format:<br>`{label: 'Orange',value: 'orange',key: 'orange'}`<br>_ The label and the value are required, but the key will be based upon the label if it isn't included<br>\* The value can be any data type | Y | Both |
35
+
| placeholder | object |_ An override for the default placeholder object with a label of `Select an item...` and a value of `null`<br>_ An empty object can be used if you'd like to disable the placeholder entirely | N | Both |
36
+
| disabled | boolean | Disables interaction with the component | N | Both |
37
+
| value | any | Will attempt to locate a matching value from the `items` array by checking each item's `value` property. If found, it will update the component to show that item as selected. If the value is not found, it will default to the first item. | N | Both |
38
+
| style | object | Style overrides for most parts of the component. More details below. | N | Both |
39
+
| hideDoneBar | boolean | Hides the bar with tabbing arrows and Done link to exit the modal. While this is typical on `select` elements on the web, the [interface guidelines](https://developer.apple.com/ios/human-interface-guidelines/controls/pickers/) does not include it. | N | iOS |
40
+
| hideIcon | boolean | Hides the floating downward arrow on the right side of the input box | N | iOS |
41
+
| onUpArrow / onDownArrow | function |_ Presence enables the corresponding arrow<br>_ Closes the picker<br>\* Calls the callback provided | N | iOS |
42
42
43
43
### Styling
44
44
45
-
* iOS
46
-
* The component wraps a TextInput without styling. In the style prop, pass a style object named `inputIOS` to style the input
47
-
* Alternatively, you can pass children (such as a custom button or input) for the component to wrap
48
-
* Other styles that can be modified for iOS are named `viewContainer`, `icon`, `done`, `modalViewTop`, `modalViewMiddle`, `modalViewBottom`, and `placeholderColor`
49
-
* Android
50
-
* The default Picker component acts similiarly to a TextInput until it is tapped, although it does not include an underline
51
-
* We emulate a typical underline, which can be modified with a style object named `underline`
52
-
* The main input can be modified with the style object named `inputAndroid`
53
-
* Alternatively, you can pass children (such as a custom button or input) for the component to wrap
54
-
* Other styles that can be modified for Android are named `viewContainer` and `placeholderColor`
45
+
*iOS
46
+
* The component wraps a TextInput without styling. In the style prop, pass a style object named `inputIOS` to style the input
47
+
* Alternatively, you can pass children (such as a custom button or input) for the component to wrap
48
+
* Other styles that can be modified for iOS are named `viewContainer`, `icon`, `done`, `modalViewTop`, `modalViewMiddle`, `modalViewBottom`, and `placeholderColor`
49
+
*Android
50
+
* The default Picker component acts similiarly to a TextInput until it is tapped, although it does not include an underline
51
+
* We emulate a typical underline, which can be modified with a style object named `underline`
52
+
* The main input can be modified with the style object named `inputAndroid`
53
+
* Alternatively, you can pass children (such as a custom button or input) for the component to wrap
54
+
* Other styles that can be modified for Android are named `viewContainer` and `placeholderColor`
0 commit comments