Added context menu items for collapsing and expanding nodes
Summary: Added 3 context menu items: - expand recursive - collapse recursive These are self explanatory. I also collapse non ancestors. This collapses everything except your direct ancestor path to the root. Quite useful to refocus the tree on a node Changelog: UIDebugger - added context menu items for exanding and collapsing the tree. Reviewed By: aigoncharov Differential Revision: D47949840 fbshipit-source-id: 6eebba182fe2092fbf5f0db0ec5ff728c3900424
This commit is contained in:
committed by
Facebook GitHub Bot
parent
129c848b78
commit
ce1fdfdf19
@@ -211,9 +211,13 @@ export function Tree2({
|
||||
focusedNodeId={focusedNode}
|
||||
hoveredNodeId={hoveredNode}
|
||||
nodes={nodes}
|
||||
onSelectNode={instance.uiActions.onSelectNode}
|
||||
onSetViewMode={instance.uiActions.onSetViewMode}
|
||||
onContextMenuOpen={instance.uiActions.onContextMenuOpen}
|
||||
onFocusNode={instance.uiActions.onFocusNode}>
|
||||
onFocusNode={instance.uiActions.onFocusNode}
|
||||
onCollapseNonAncestors={instance.uiActions.onCollapseAllNonAncestors}
|
||||
onCollapseRecursively={instance.uiActions.onCollapseAllRecursively}
|
||||
onExpandRecursively={instance.uiActions.onExpandAllRecursively}>
|
||||
<div
|
||||
//We use this normal divs flexbox sizing to measure how much vertical space we need for the child div
|
||||
ref={grandParentRef}
|
||||
|
||||
Reference in New Issue
Block a user