useControlledTreeFiltering Function

Beta  

A custom hook that creates filtered model source and node loader for supplied filter. If filter string is not provided or filtering is still in progress it returns supplied model source and node loader.

Note: it is required for the tree to use IPresentationTreeDataProvider.

useControlledTreeFiltering(nodeLoader: AbstractTreeNodeLoaderWithProvider<IPresentationTreeDataProvider>, modelSource: TreeModelSource, filter: string | undefined, activeMatch?: number): { filteredModelSource: TreeModelSource, filteredNodeLoader: AbstractTreeNodeLoaderWithProvider<IPresentationTreeDataProvider> | AbstractTreeNodeLoaderWithProvider<>, isFiltering: boolean, matchesCount: number, nodeHighlightingProps: HighlightableTreeProps }

Parameter Type Description
nodeLoader AbstractTreeNodeLoaderWithProvider<IPresentationTreeDataProvider>  
modelSource TreeModelSource  
filter string | undefined  
activeMatch number  

Returns - { filteredModelSource: TreeModelSource, filteredNodeLoader: AbstractTreeNodeLoaderWithProvider<IPresentationTreeDataProvider> | AbstractTreeNodeLoaderWithProvider<>, isFiltering: boolean, matchesCount: number, nodeHighlightingProps: HighlightableTreeProps }

Defined in

Last Updated: 13 June, 2024