mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 14:15:50 -06:00
Add clarification on selection index. Fixes #158
This commit is contained in:
parent
a938308d14
commit
d7296eff3b
1 changed files with 29 additions and 29 deletions
|
|
@ -11,11 +11,11 @@ class Example extends Component {
|
|||
render() {
|
||||
return (
|
||||
<App>
|
||||
<Window title="Example" size={{w: 500, h: 500}}>
|
||||
<Window title="Example" size={{ w: 500, h: 500 }}>
|
||||
<Picker>
|
||||
<Picker.Item>Option 1</Picker.Item>
|
||||
<Picker.Item>Option 2</Picker.Item>
|
||||
<Picker.Item>Option 3</Picker.Item>
|
||||
<Picker.Item>Option 1</Picker.Item>
|
||||
<Picker.Item>Option 2</Picker.Item>
|
||||
<Picker.Item>Option 3</Picker.Item>
|
||||
</Picker>
|
||||
</Window>
|
||||
</App>
|
||||
|
|
@ -28,11 +28,11 @@ render(<Example />);
|
|||
|
||||
## Props
|
||||
|
||||
- [editable](#editable)
|
||||
- [enabled](#enabled)
|
||||
- [visible](#visible)
|
||||
- [selected](#selected)
|
||||
- [text](#text)
|
||||
* [editable](#editable)
|
||||
* [enabled](#enabled)
|
||||
* [visible](#visible)
|
||||
* [selected](#selected)
|
||||
* [text](#text)
|
||||
|
||||
## Reference
|
||||
|
||||
|
|
@ -41,53 +41,53 @@ render(<Example />);
|
|||
Whether the user can enter their own custom text in addition to the drop down menu.
|
||||
|
||||
| **Type** | **Required** | **Default** |
|
||||
| --- | --- | --- |
|
||||
| bool | No | false |
|
||||
| -------- | ------------ | ----------- |
|
||||
| bool | No | false |
|
||||
|
||||
### enabled
|
||||
|
||||
Whether the Picker is enabled.
|
||||
|
||||
| **Type** | **Required** | **Default** |
|
||||
| --- | --- | --- |
|
||||
| bool | No | true |
|
||||
| -------- | ------------ | ----------- |
|
||||
| bool | No | true |
|
||||
|
||||
### visible
|
||||
|
||||
Whether the Picker can be seen.
|
||||
|
||||
| **Type** | **Required** | **Default** |
|
||||
| --- | --- | --- |
|
||||
| bool | No | true |
|
||||
| -------- | ------------ | ----------- |
|
||||
| bool | No | true |
|
||||
|
||||
### selected
|
||||
|
||||
What element is selected if the picker *is not* editable.
|
||||
The index of the element that is selected if the picker _is not_ editable.
|
||||
|
||||
| **Type** | **Required** | **Editable** | **Default** |
|
||||
| --- | --- | --- | --- |
|
||||
| bool | No | No | -1 |
|
||||
| -------- | ------------ | ------------ | ----------- |
|
||||
| number | No | No | -1 |
|
||||
|
||||
### text
|
||||
|
||||
What text is selected/typed if the picker *is* editable.
|
||||
What text is selected/typed if the picker _is_ editable.
|
||||
|
||||
| **Type** | **Required** | **Editable** | **Default** |
|
||||
| --- | --- | --- | --- |
|
||||
| bool | No | Yes | '' |
|
||||
| -------- | ------------ | ------------ | ----------- |
|
||||
| string | No | Yes | '' |
|
||||
|
||||
### onSelect
|
||||
|
||||
When a *non-editable* Picker is changed. The current selection is passed as an argument.
|
||||
When a _non-editable_ Picker is changed. The current selection index is passed as an argument.
|
||||
|
||||
| **Type** | **Required** | **Editable** |
|
||||
| --- | --- | --- |
|
||||
| function(selection) | No | No |
|
||||
| **Type** | **Required** | **Editable** |
|
||||
| ------------------------ | ------------ | ------------ |
|
||||
| function(selectionIndex) | No | No |
|
||||
|
||||
### onChange
|
||||
|
||||
When an *editable* Picker is changed. The current text is passed as an argument.
|
||||
When an _editable_ Picker is changed. The current text is passed as an argument.
|
||||
|
||||
| **Type** | **Required** | **Editable** |
|
||||
| --- | --- | --- |
|
||||
| function(text) | No | Yes |
|
||||
| **Type** | **Required** | **Editable** |
|
||||
| -------------- | ------------ | ------------ |
|
||||
| function(text) | No | Yes |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue