diff --git a/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeFilter.ts b/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeFilter.ts index 1f83e46b20..88e238fb12 100644 --- a/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeFilter.ts +++ b/webapp/packages/plugin-navigation-tree/src/TreeNew/useTreeFilter.ts @@ -29,8 +29,12 @@ export function useTreeFilter(options: ITreeFilterOptions = {}): Readonly(); - function hasMatchingDescendant( - treeData: ITreeData, nodeId: string, filter: string, matchFn: (treeData: ITreeData, nodeId: string) => boolean): boolean { + function matchesOrHasMatchingDescendant( + treeData: ITreeData, + nodeId: string, + filter: string, + matchFn: (treeData: ITreeData, nodeId: string) => boolean, + ): boolean { const cacheKey = `${nodeId}:${filter}`; if (matchCache.has(cacheKey)) { return matchCache.get(cacheKey)!; @@ -43,7 +47,7 @@ export function useTreeFilter(options: ITreeFilterOptions = {}): Readonly { const state = useObservableRef( () => ({ - openMenu(event: React.MouseEvent, nodeId: string) { + openMenu(event: React.MouseEvent, nodeId: string) { this.menu.context.deleteForId(this.id); this.menu.context.set(DATA_CONTEXT_NAV_NODE_ID, nodeId, this.id);