Skip to content

Commit 01d8e55

Browse files
paulrostorplukasbach
authored andcommitted
feat: pass depth + parentId to renderItemsContainer
1 parent 87c6be5 commit 01d8e55

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/core/src/treeItem/TreeItemChildren.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,7 @@ export const TreeItemChildren = (props: {
3030
children: childElements,
3131
info: treeInformation,
3232
containerProps,
33+
depth: props.depth,
34+
parentId: props.parentId,
3335
}) as any;
3436
};

packages/core/src/types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ export interface TreeRenderProps<T = any, C extends string = never> {
114114
children: React.ReactNode;
115115
containerProps: HTMLProps<any>;
116116
info: TreeInformation;
117+
depth: number;
118+
parentId: TreeItemIndex;
117119
}) => React.ReactElement | null;
118120

119121
renderTreeContainer?: (props: {

0 commit comments

Comments
 (0)