Package Exports
- rc-select
- rc-select/assets/index.css
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rc-select) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rc-select
select ui component for react
Screenshots

Feature
- support ie8,ie8+,chrome,firefox,safari
Keyboard
- Open select (focus input || focus and click)
- Previous item (PageUp)
- Next item (PageDown)
install
Usage
basic use
var React = require('react');
var Select = require('../');
var Option = Select.Option;
var c = (
<Select>
<Option value="1">jack</Option>
<Option value="2">lucy</Option>
<Option value="3">jim</Option>
</Select>
);
React.render(c, container);
API
Select props
name | type | default | description |
---|---|---|---|
className | String | additional css class of root dom node | |
value | String | Array | specify the default selected item(s) | |
multiple | false | can select more than one option | |
allowClear | false | ||
maximumSelectionLength | Select multi-value select boxes can set restrictions regarding the maximum number of options selected | ||
onSelect | function(key:String,child:ReactComponent) | called when select an option | |
onDeselect | function(key:String,child:ReactComponent) | called when deselect an option (for mutiple select) |
Option props
name | type | default | description |
---|---|---|---|
className | String | additional css class of root dom node | |
disabled | Boolean | false | no effect for click or keydown for this item |
value | String | search by this attribute |
Combobox props (autocomplete)
name | type | default | description |
---|---|---|---|
className | String | additional css class of root dom node | |
value | String | default value in input control |
online docs: http://spmjs.io/docs/rc-select/
Development
npm install
npm start
Example
http://localhost:8003/examples/index.md
online example: http://spmjs.io/docs/rc-select/examples/
Test Case
http://localhost:8003/tests/runner.html?coverage
Coverage
License
rc-select is released under the MIT license.