Skip to content

Commit

Permalink
fix(comp:tree): virtual treeNode slots not passed (#1799)
Browse files Browse the repository at this point in the history
* build: remove uncessary console statements

* fix(comp:tree): virtual treeNode slots not passed
  • Loading branch information
sallerli1 committed Jan 8, 2024
1 parent dfbaec7 commit f9361f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/components/tree/src/Tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ export default defineComponent({

let children: VNodeTypes
if (nodes.length > 0) {
const rowRender: VirtualRowRenderFn<MergedNode> = ({ item }) => <TreeNode node={item} {...item}></TreeNode>
const rowRender: VirtualRowRenderFn<MergedNode> = ({ item }) => (
<TreeNode v-slots={slots} node={item} {...item}></TreeNode>
)
const { height, virtual, virtualItemHeight, onScroll, onScrolledBottom } = props
children = virtual ? (
<CdkVirtualScroll
Expand Down
1 change: 0 additions & 1 deletion packages/components/tree/src/node/Expand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export default defineComponent({
children = <IxIcon name="loading"></IxIcon>
} else if (!props.isLeaf) {
const { expanded, nodeKey: key, rawNode: node } = props
console.log('renderExpand', slots.expandIcon)
children = (slots.expandIcon ?? expandIconRenderer)?.({ key, expanded, node })
}

Expand Down

0 comments on commit f9361f7

Please sign in to comment.