rmc-cascader
React Mobile Cascader Component (web and react-native)
Screenshots
web
native
Development
npm i
npm i typings -g
typings install
npm start
npm run watch-tsc
Example
http://localhost:8000/examples/
online example: http://react-component.github.io/m-cascader/
react-native
npm run rn-start
load
http://localhost:8081/examples/react-native/simple.bundle?platform=ios
http://localhost:8081/examples/react-native/popup.bundle?platform=ios
in RNPlayground
install
API
MCascader props
name | description | type | default |
---|
className(web) | additional css class of root dom node | String | '' |
prefixCls(web) | prefix class | String | 'rmc-cascader' |
pickerPrefixCls(web) | picker prefix class | String | 'rmc-picker' |
data | The data of cascade | array | |
value | selected value | array | |
defaultValue | initial selected value | array | |
onChange | | Function(value) | - |
name | description | type | default |
---|
className(web) | additional css class of modal node | String | '' |
prefixCls(web) | prefix class | String | 'rmc-cascader' |
pickerPrefixCls(web) | picker prefix class | String | 'rmc-picker' |
style(web) | additional style | object | {} |
data | The data of cascade | array | |
value | selected value | array | |
defaultValue | initial selected value | array | |
onPickerChange | | Function(value) | - |
onChange | exec on ok | Function(value) | |
onDismiss | exec on dismiss | function | |
okText | ok button text | String | 'Ok' |
dismissText | dismiss button text | String | 'Dismiss' |
title | Popup title | String | '' |
visible | whether pop picker is visible | Boolean | |
onVisibleChange | called when pop picker visible change | Function | |
Test Case
npm test
npm run chrome-test
Coverage
npm run coverage
open coverage/ dir
License
rmc-cascader is released under the MIT license.