import Select, {Option, OptGroup} from 'rc-select';
var c = (
<Select>
<Option value="jack">jack</Option>
<Option value="lucy">lucy</Option>
<Option value="yiminghe">yiminghe</Option>
</Select>
);
React.render(c, container);
API
Select props
name
description
type
default
className
additional css class of root dom node
String
''
prefixCls
prefix class
String
''
animation
dropdown animation name. only support slide-up now
String
''
transitionName
dropdown css animation name
String
''
choiceTransitionName
css animation name for selected items at multiple mode
String
''
dropdownMatchSelectWidth
whether dropdown's with is same with select
bool
true
dropdownClassName
additional className applied to dropdown
String
-
dropdownStyle
additional style applied to dropdown
Object
{}
dropdownAlign
additional align applied to dropdown
Object
{}
dropdownMenuStyle
additional style applied to dropdown menu
Object
{}
notFoundContent
specify content to show when no result matches.
String
'Not Found'
tokenSeparators
separator used to tokenize on tag/multiple mode
string[]?
placeholder
select placeholder
React Node
showSearch
whether show search input in single mode
bool
true
showArrow
whether show arrow in single mode
bool
true
allowClear
whether allowClear
bool
false
tags
when tagging is enabled the user can select from pre-existing options or create a new tag by picking the first choice, which is what the user has typed into the search box so far.
bool
false
maxTagTextLength
max tag text length to show
number
-
maxTagCount
max tag count to show
number
-
maxTagPlaceholder
placeholder for omitted values
ReactNode/function(omittedValues)
-
combobox
enable combobox mode(can not set multiple at the same time)
bool
false
multiple
whether multiple select
bool
false
disabled
whether disabled select
bool
false
filterOption
whether filter options by input value. default filter by option's optionFilterProp prop's value
bool
true/Function(inputValue:string, option:Option)
optionFilterProp
which prop value of option will be used for filter if filterOption is true
String
'value'
optionLabelProp
render option value or option children as content of select