Here is an examples page
-
⚡ Super mega fast! It’s based on super fast virtulized-lists library react-window
-
🎨 Super customizable! Any components, any classNames, any styles for ALL included elements!
-
🍔 Content structure INDEPENDENT! Write your personal selectors to get children and expanded statuses! You can use flat or structured data arrays or Immutable.js iterable constructions.
See source code of examples here
| Property | Type | Description |
|---|---|---|
node |
any |
Node data object |
depth |
number |
Depth of node |
hasChildren |
boolean |
Has children sign |
isExpanded |
boolean |
Is expanded sign |
index |
number |
Index of node |
additionalData |
Any |
Additional data |
| Property | Type | Required? | Description |
|---|---|---|---|
width |
Number |
✓ |
Width of tree container. |
height |
Number |
✓ |
Height of tree container. |
nodes |
Iterable object |
✓ |
Tree node-items. |
isNodeExpandedSelector |
Function |
✓ |
Selector to get expanded status of node item. |
nodeChildrenSelector |
Function |
✓ |
Selector to get child-nodes. |
hasChildrenSelector |
Function |
Selector to determine children presence. You can skip this selector, so the result
of |
|
nodeContentSelector |
Function |
✓ |
Node’s content selector. |
firstLevelNodesSelector |
Function |
✓ |
Selector to get first level items (with no parents). |
levelPadding |
number |
Padding-left of 1x depth level. Default: |
|
noExpanderSpaceWidth |
number |
Blank space width when there is no expander. Default: |
|
nodeClassName |
string or Function |
Node optional className string or generate function. Function arguments: |
|
nodeStyle |
Object or Function |
Node optional style object or generate function. Function arguments: |
|
nodeContentClassName |
string or Function |
Node content optional className string or generate function. Function arguments: |
|
nodeContentStyle |
Object or Function |
Node content optional style object or generate function. Function arguments: |
|
onNodeClick |
Function |
On node click handler. Function arguments: |
|
onNodeCollapse |
Function |
On node collapse handler. Function arguments: |
|
onNodeContextMenu |
Function |
On node context menu handler. Function arguments: |
|
onNodeDoubleClick |
Function |
On node double click handler. Function arguments: |
|
onNodeExpand |
Function |
On node expand handler. Function arguments: |
|
nodeExpanderComponent |
Function |
Node Expander component. |
|
nodeContentComponent |
Function |
Node content component. |
|
itemHeight |
number |
Height of tree row. Default: |
|
onScroll |
Function |
On scroll tree list handler. |
|
className |
string |
Optional class name tree-list. |
|
style |
Object |
Optional CSS style object for tree-list. |
|
initialScrollOffset |
number |
Scroll offset for initial tree list render. |
|
listProps |
Object |
Any other react-window list props. See https://react-window.now.sh/#/api/FixedSizeList for more info. |
|
additionalData |
Any |
Additional data for |
| Property | Type | Required? | Description |
|---|---|---|---|
… Includes all fields of |
|||
onClick |
Function |
Expand/collapse handler |
|
className |
string |
Expander default className |
|
MIT © avin