diff --git a/src/components/TreeList/TreeList.tsx b/src/components/TreeList/TreeList.tsx index a31acea0e9..b48fa298d6 100644 --- a/src/components/TreeList/TreeList.tsx +++ b/src/components/TreeList/TreeList.tsx @@ -78,6 +78,7 @@ export const TreeList = ({ if (propsRenderItem) { return propsRenderItem({ + id: itemId, data: renderState.data, props: renderState.props, context: renderState.context, diff --git a/src/components/TreeList/types.ts b/src/components/TreeList/types.ts index 466bcdec5f..9dbb33aa22 100644 --- a/src/components/TreeList/types.ts +++ b/src/components/TreeList/types.ts @@ -12,6 +12,7 @@ import type { } from '../useList'; export type TreeListRenderItem = (props: { + id: ListItemId; data: T; // required item props to render props: RenderItemProps; diff --git a/src/unstable.ts b/src/unstable.ts index 92a4858717..18fdbba59f 100644 --- a/src/unstable.ts +++ b/src/unstable.ts @@ -11,6 +11,7 @@ export { ListContainer as unstable_ListContainer, type ListContainerViewProps as unstable_ListContainerViewProps, type ListItemType as unstable_ListItemType, + type ListTreeItemType as unstable_ListTreeItemType, type ListItemId as unstable_ListItemId, type UseListResult as unstable_UseListResult, getItemRenderState as unstable_getItemRenderState,