-
Notifications
You must be signed in to change notification settings - Fork 2
Select Option
brandonk1234 edited this page Dec 5, 2016
·
4 revisions
The select option component allows the user to select a value from a series of options.
The props needed for this component are listed and explained below:
-
className
- This prop must be astring
. -
type
- This prop must be astring
. -
iconPosition
- This prop must be astring
. -
isSmall
- This prop must be aboolean
. Use this to have a smaller version of the component -
initialText
- This prop must be astring
. -
value
- This prop must be astring
. -
options
- This prop must be aarray of objects
with the given keys shown in the example. -
onChange
- This prop must be afunction
.
<SelectOptions
className="options"
type="primary"
isSmall={true}
value={this.state.value}
initialText="Select"
onChange={this.onSelectOptionChanged}
options={[
{
text: 'Ascending',
_value: 'ascending'
},
{
text: 'Descending',
_value: 'descending'
},
{
text: 'Recent',
_value: 'recent'
},
{
text: 'Oldest',
_value: 'oldest'
}
]}
/>