Skip to content

Commit

Permalink
Fix #5393: Tree propagate icons to leaf nodes (#5394)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Nov 25, 2023
1 parent b256a21 commit d53f65b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 51 deletions.
52 changes: 26 additions & 26 deletions components/lib/tree/Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,41 +341,41 @@ export const Tree = React.memo(
hostName="Tree"
key={node.key || node.label}
node={node}
originalOptions={props.value}
index={index}
last={last}
path={String(index)}
checkboxIcon={props.checkboxIcon}
expandIcon={props.expandIcon}
collapseIcon={props.collapseIcon}
disabled={props.disabled}
selectionMode={props.selectionMode}
selectionKeys={props.selectionKeys}
onSelectionChange={props.onSelectionChange}
metaKeySelection={props.metaKeySelection}
contextMenuSelectionKey={props.contextMenuSelectionKey}
onContextMenuSelectionChange={props.onContextMenuSelectionChange}
onContextMenu={props.onContextMenu}
propagateSelectionDown={props.propagateSelectionDown}
propagateSelectionUp={props.propagateSelectionUp}
onExpand={props.onExpand}
onCollapse={props.onCollapse}
onSelect={props.onSelect}
onUnselect={props.onUnselect}
cx={cx}
disabled={props.disabled}
dragdropScope={props.dragdropScope}
expandIcon={props.expandIcon}
expandedKeys={expandedKeys}
onToggle={onToggle}
nodeTemplate={props.nodeTemplate}
togglerTemplate={props.togglerTemplate}
index={index}
isNodeLeaf={isNodeLeaf}
dragdropScope={props.dragdropScope}
onDragStart={onDragStart}
last={last}
metaKeySelection={props.metaKeySelection}
nodeTemplate={props.nodeTemplate}
onClick={props.onNodeClick}
onCollapse={props.onCollapse}
onContextMenu={props.onContextMenu}
onContextMenuSelectionChange={props.onContextMenuSelectionChange}
onDoubleClick={props.onNodeDoubleClick}
onDragEnd={onDragEnd}
onDragStart={onDragStart}
onDrop={onDrop}
onDropPoint={onDropPoint}
onClick={props.onNodeClick}
onDoubleClick={props.onNodeDoubleClick}
onExpand={props.onExpand}
onSelect={props.onSelect}
onSelectionChange={props.onSelectionChange}
onToggle={onToggle}
onUnselect={props.onUnselect}
originalOptions={props.value}
path={String(index)}
propagateSelectionDown={props.propagateSelectionDown}
propagateSelectionUp={props.propagateSelectionUp}
ptm={ptm}
cx={cx}
selectionKeys={props.selectionKeys}
selectionMode={props.selectionMode}
togglerTemplate={props.togglerTemplate}
/>
);
};
Expand Down
53 changes: 28 additions & 25 deletions components/lib/tree/UITreeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,40 +743,43 @@ export const UITreeNode = React.memo((props) => {
<UITreeNode
key={childNode.key || childNode.label}
node={childNode}
originalOptions={props.originalOptions}
parent={props.node}
checkboxIcon={props.checkboxIcon}
collapseIcon={props.collapseIcon}
contextMenuSelectionKey={props.contextMenuSelectionKey}
cx={cx}
disabled={props.disabled}
dragdropScope={props.dragdropScope}
expandIcon={props.expandIcon}
expandedKeys={props.expandedKeys}
index={index}
isNodeLeaf={props.isNodeLeaf}
last={index === props.node.children.length - 1}
path={props.path + '-' + index}
disabled={props.disabled}
selectionMode={props.selectionMode}
selectionKeys={props.selectionKeys}
onSelectionChange={props.onSelectionChange}
metaKeySelection={props.metaKeySelection}
propagateSelectionDown={props.propagateSelectionDown}
propagateSelectionUp={props.propagateSelectionUp}
contextMenuSelectionKey={props.contextMenuSelectionKey}
onContextMenuSelectionChange={props.onContextMenuSelectionChange}
onContextMenu={props.onContextMenu}
onExpand={props.onExpand}
onCollapse={props.onCollapse}
onSelect={props.onSelect}
onUnselect={props.onUnselect}
nodeTemplate={props.nodeTemplate}
onClick={props.onClick}
onCollapse={props.onCollapse}
onContextMenu={props.onContextMenu}
onContextMenuSelectionChange={props.onContextMenuSelectionChange}
onDoubleClick={props.onDoubleClick}
expandedKeys={props.expandedKeys}
onToggle={props.onToggle}
onPropagateUp={propagateUp}
nodeTemplate={props.nodeTemplate}
togglerTemplate={props.togglerTemplate}
isNodeLeaf={props.isNodeLeaf}
dragdropScope={props.dragdropScope}
onDragStart={props.onDragStart}
onDragEnd={props.onDragEnd}
onDragStart={props.onDragStart}
onDrop={props.onDrop}
onDropPoint={props.onDropPoint}
onExpand={props.onExpand}
onPropagateUp={propagateUp}
onSelect={props.onSelect}
onSelectionChange={props.onSelectionChange}
onToggle={props.onToggle}
onUnselect={props.onUnselect}
originalOptions={props.originalOptions}
parent={props.node}
path={props.path + '-' + index}
propagateSelectionDown={props.propagateSelectionDown}
propagateSelectionUp={props.propagateSelectionUp}
ptm={ptm}
cx={cx}
selectionKeys={props.selectionKeys}
selectionMode={props.selectionMode}
togglerTemplate={props.togglerTemplate}
/>
);
})}
Expand Down

0 comments on commit d53f65b

Please sign in to comment.