Skip to main content

UseSharePointTreeViewReturn

@spartanfx/react v1.2.2


@spartanfx/react / spfx / UseSharePointTreeViewReturn

Interface: UseSharePointTreeViewReturn

Return value of useSharePointTreeView. Spread items and schema into the <TreeView /> component; use loading/error for your own UI.

Properties

PropertyTypeDescription
errorErrorLast load error, or null.
itemsITreeViewDataItem[]Items shaped for the TreeView (parentId or path populated per mode).
loadingbooleanTrue while the initial load or a refresh is in flight.
refresh() => Promise<void>Re-fetch the items from SharePoint.
schemaITreeViewSchema<ITreeViewDataItem>Schema matching the active hierarchy mode — pass straight to <TreeView />.