Skip to content

Commit

Permalink
feat: row direction support (#337)
Browse files Browse the repository at this point in the history
* css direction change

* direction attribute added to test snapshot

* direction attr set to 'ltr' by default, ltr classes added

* updating tests and cleaning up

* removing rtl from demo

* prettier

* default rowDirection=ltr

* update props

* documentation

* updating snapshot
  • Loading branch information
wuweiweiwu committed Jun 6, 2018
1 parent 6556e4d commit 5bef44b
Show file tree
Hide file tree
Showing 11 changed files with 889 additions and 28 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default class Tree extends Component {
| onVisibilityToggle | func | Called after children nodes collapsed or expanded. <div>`({ treeData: object[], node: object, expanded: bool, path: number[] or string[] }): void`</div> |
| onDragStateChanged | func | Called when a drag is initiated or ended. <div>`({ isDragging: bool, draggedNode: object }): void`</div> |
| maxDepth | number | Maximum depth nodes can be inserted at. Defaults to infinite. |
| rowDirection | string | Adds row direction support if set to `'rtl'` Defaults to `'ltr'`. |
| canDrag | func or bool | Return false from callback to prevent node from dragging, by hiding the drag handle. Set prop to `false` to disable dragging on all nodes. Defaults to `true`. <div>`({ node: object, path: number[] or string[], treeIndex: number, lowerSiblingCounts: number[], isSearchMatch: bool, isSearchFocus: bool }): bool`</div> |
| canDrop | func | Return false to prevent node from dropping in the given location. <div>`({ node: object, prevPath: number[] or string[], prevParent: object, prevTreeIndex: number, nextPath: number[] or string[], nextParent: object, nextTreeIndex: number }): bool`</div> |
| theme | object | Set an all-in-one packaged appearance for the tree. See the [Themes](#themes) section for more information. |
Expand Down
Loading

0 comments on commit 5bef44b

Please sign in to comment.