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)
- KeyDown/KeyUp/Enter to navigate menu
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 | |
filterOption | true | whether filter options by input value | |
tags | false | 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. | |
allowClear | false | ||
combobox | false | enable combobox mode(can not set multiple at the same time) | |
onSelect | Function | called when a option is selected. param is option's value | |
onDeselect | Function | called when a option is deselected. param is option's value. only called for multiple or tags | |
onChange | function(value) | called when select an option or input value change(combobox) |
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 |
Development
npm install
npm start
Example
http://localhost:8003/examples/
online example: http://react-component.github.io/select/examples/
Test Case
http://localhost:8003/tests/runner.html?coverage
Coverage
License
rc-select is released under the MIT license.