rc-cascader

esm Styles
cascade select ui component for react
Version 3.34.0 License MIT
Keywords
reactreact-componentreact-cascaderreact-selectselectcascadecascader
INSTALL
Type:
Version:
- Static
- Latest Patch
- Latest Minor
- Latest Major
- 3.34.0
- 3.33.1
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.1
- 3.29.0
- 3.28.2
- 3.28.1
- 3.28.0
- 3.27.1
- 3.27.0
- 3.26.0
- 3.25.0
- 3.24.1
- 3.24.0
- 3.23.0
- 3.22.0
- 3.21.2
- 3.21.0
- 3.20.0
- 3.19.2
- 3.19.1
- 3.19.0
- 3.18.1
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.1
- 3.15.0
- 3.14.1
- 3.14.0
- 3.13.0
- 3.12.1
- 3.12.0
- 3.11.2
- 3.11.1
- 3.11.0
- 3.10.3
- 3.10.2
- 3.10.1
- 3.10.0
- 3.9.1
- 3.9.0
- 3.8.1
- 3.8.0
- 3.7.3
- 3.7.2
- 3.7.1
- 3.7.0
- 3.6.2
- 3.6.1
- 3.6.0
- 3.5.0
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.1
- 3.3.0
- 3.2.9
- 3.2.8
- 3.2.7
- 3.2.6
- 3.2.5
- 3.2.4
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 1.5.0
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.1
- 1.0.0
- 0.17.5
- 0.17.4
- 0.17.3
- 0.17.2
- 0.17.1
- 0.17.0
- 0.16.2
- 0.16.1
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.1
- 0.13.0
- 0.12.2
- 0.12.1
- 0.12.0
- 0.11.6
- 0.11.5
- 0.11.4
- 0.11.3
- 0.11.2
- 0.11.1
- 0.11.0
- 0.10.4
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.11
- 0.9.10
- 0.9.9
- 0.9.8
- 0.9.7
- 0.9.6
- 0.9.5
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.1
- 0.8.0
- 0.7.0
- 0.6.1
- 0.6.0
- 0.5.1
- 0.5.0
- 0.4.1
- 0.4.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1.0
- 3.13.0-alpha.0
- 3.1.0-0
- 3.0.0-alpha.8
- 3.0.0-alpha.7
- 3.0.0-alpha.6
- 3.0.0-alpha.5
- 3.0.0-alpha.4
- 3.0.0-alpha.3
- 3.0.0-alpha.2
- 3.0.0-alpha.1
- 3.0.0-alpha.0
- 2.0.0-alpha.18
- 2.0.0-alpha.17
- 2.0.0-alpha.16
- 2.0.0-alpha.15
- 2.0.0-alpha.14
- 2.0.0-alpha.13
- 2.0.0-alpha.12
- 2.0.0-alpha.11
- 2.0.0-alpha.10
- 2.0.0-alpha.9
- 2.0.0-alpha.8
- 2.0.0-alpha.7
- 2.0.0-alpha.6
- 2.0.0-alpha.5
- 2.0.0-alpha.4
- 2.0.0-alpha.3
- 2.0.0-alpha.2
- 2.0.0-alpha.1
- 2.0.0-alpha.0
- 1.0.0-alpha.0
rc-cascader
React Cascader Component.
Browser Support
![]() IE / Edge |
![]() Firefox |
![]() Chrome |
![]() Safari |
![]() Electron |
---|---|---|---|---|
IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
Screenshots

Example
https://cascader-react-component.vercel.app
Install
$ npm install rc-cascader --save
Usage
import React from 'react';
import Cascader from 'rc-cascader';
const options = [{
'label': '福建',
'value': 'fj',
'children': [{
'label': '福州',
'value': 'fuzhou',
'children': [{
'label': '马尾',
'value': 'mawei',
}],
}, {
'label': '泉州',
'value': 'quanzhou',
}],
}, {
'label': '浙江',
'value': 'zj',
'children': [{
'label': '杭州',
'value': 'hangzhou',
'children': [{
'label': '余杭',
'value': 'yuhang',
}],
}],
}, {
'label': '北京',
'value': 'bj',
'children': [{
'label': '朝阳区',
'value': 'chaoyang',
}, {
'label': '海淀区',
'value': 'haidian',
}],
}];
React.render(
<Cascader options={options}>
...
</Cascader>
, container);
API
props
name | type | default | description |
---|---|---|---|
autoClearSearchValue | boolean | true | Whether the current search will be cleared on selecting an item. Only applies when checkable |
options | Object | The data options of cascade | |
value | Array | selected value | |
defaultValue | Array | initial selected value | |
onChange | Function(value, selectedOptions) | callback when finishing cascader select | |
changeOnSelect | Boolean | false | change value on each selection |
loadData | Function(selectedOptions) | callback when click any option, use for loading more options | |
expandTrigger | String | 'click' | expand current item when click or hover |
open | Boolean | visibility of popup overlay | |
onDropdownVisibleChange | Function(visible) | callback when popup overlay's visibility changed | |
transitionName | String | transition className like "slide-up" | |
prefixCls | String | rc-cascader | prefix className of popup overlay |
dropdownClassName | String | additional className of popup overlay | |
popupPlacement | String | bottomLeft | use preset popup align config from builtinPlacements:bottomRight topRight bottomLeft topLeft |
getPopupContainer | function(trigger:Node):Node | () => document.body | container which popup select menu rendered into |
dropdownMenuColumnStyle | Object | style object for each cascader pop menu | |
fieldNames | Object | { label: 'label', value: 'value', children: 'children' } | custom field name for label and value and children |
expandIcon | ReactNode | > | specific the default expand icon |
loadingIcon | ReactNode | > | specific the default loading icon |
hidePopupOnSelect | Boolean | >true | hide popup on select |
option
name | type | default | description |
---|---|---|---|
label | String | option text to display | |
value | String | option value as react key | |
disabled | Boolean | disabled option | |
children | Array | children options |
Development
$ npm install
$ npm start
Test Case
$ npm test
Coverage
$ npm run coverage
License
rc-cascader is released under the MIT license.