1.1.6 • Published 8 years ago

rc-tree-select-wl v1.1.6

Weekly downloads
2
License
-
Repository
github
Last release
8 years ago

rc-tree-select


React TreeSelect Component

NPM version build status Test coverage gemnasium deps node version npm download Sauce Test Status

Sauce Test Status

Browser Support

IEChromeFirefoxOperaSafari
IE 8+ ✔Chrome 31.0+ ✔Firefox 31.0+ ✔Opera 30.0+ ✔Safari 7.0+ ✔

Screenshots

Development

npm install
npm start

Example

http://localhost:8000/examples/

online example: http://react-component.github.io/tree-select/

Feature

  • support ie8,ie8+,chrome,firefox,safari

Keyboard

install

rc-tree-select

Usage

see examples

API

TreeSelect props

namedescriptiontypedefault
classNameadditional css class of root dom nodeString''
prefixClsprefix classString''
animationdropdown animation name. only support slide-up nowString''
transitionNamedropdown css animation nameString''
choiceTransitionNamecss animation name for selected items at multiple modeString''
dropdownMatchSelectWidthwhether dropdown's with is same with selectbooltrue
dropdownClassNameadditional className applied to dropdownString-
dropdownStyleadditional style applied to dropdownObject{}
notFoundContentspecify content to show when no result matches.String'Not Found'
showSearchwhether show search input in single modebooltrue
allowClearwhether allowClearboolfalse
tagswhen 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.boolfalse
maxTagTextLengthmax tag text length to shownumber-
comboboxenable combobox mode(can not set multiple at the same time)boolfalse
multiplewhether multiple selectboolfalse
disabledwhether disabled selectboolfalse
defaultValueinitial selected option(s)String/Array-
valuecurrent selected option(s)String/Array-
onChangecalled when select treeNode or input value change(combobox)function(value, label)-
onSelectcalled when select treeNodefunction(value, node)-
onSearchcalled when input changedfunction-
treeIconshow tree iconboolfalse
treeLineshow tree lineboolfalse
treeDefaultExpandAlldefault expand all treeNodeboolfalse
treeCheckablewhether tree show checkbox (select callback will not fire)boolfalse
filterTreeNodefilter some treeNodes as you need. it should return truefunction(treeNode)-
treeNodeFilterPropwhich prop value of treeNode will be used for filter if filterTreeNode return trueString'value'
treeNodeLabelPropwhich prop value of treeNode will render as content of selectString'title'
treeDatatreeNodes data Array, if set it then you need not to construct children TreeNode. (if value is not unique of the whole array, you must provide key as unique id)array<{value, label, children}>[]
loadDataload data asynchronouslyfunction(node)-

TreeNode props

note: you'd better to use treeData instead of using TreeNode.

namedescriptiontypedefault
disableddisable treeNodeboolfalse
keyit's value must be unique across the tree's all TreeNode, you must set itString-
valuedefault as treeNodeFilterPropString''
titletree/subTree's titleString'---'
isLeafwhether it's leaf nodeboolfalse

Test Case

http://localhost:8000/tests/runner.html?coverage

Coverage

http://localhost:8000/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8000/tests/runner.html?coverage

License

rc-tree-select is released under the MIT license.