This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 231
Dropdown
Kelly edited this page Jul 3, 2018
·
1 revision
Property | Description | Type | Default |
---|---|---|---|
className |
Custom dropdown style | string | - |
is_nativepicker |
Whether to show nativepicker | boolean | - |
list |
Array of dropdown options; objects with text and value properties |
array|object |
- |
name |
Sets the dropdown name attribute |
string | - |
onChange |
Callback function for when a dropdown option is selected | function() | - |
type |
Sets the dropdown type | string | - |
value |
Sets the dropdown value | number|string |
- |
const list = [
{
text: 'Apple',
value: 'apple',
},
{
text: 'Orange',
value: 'orange',
}
];
let value = '';
function onChange(e) {
value = e.target.value;
}
<Dropdown
name='fruits'
list={list}
value={value}
onChange={onChange}
is_nativepicker={false}
/>