MCPcopy Create free account
hub / github.com/TanStack/query / hasSearchMatchingChild

Function hasSearchMatchingChild

packages/query-devtools/src/Explorer.tsx:444–446  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

442 (props.defaultExpanded || []).includes(props.label),
443 )
444 const hasSearchMatchingChild = () =>
445 !!props.search &&
446 [...props.search.match.children.values()].some((child) => child.hasMatch)
447 const isExpanded = () => expanded() || hasSearchMatchingChild()
448 const toggleExpanded = () => {
449 if (!hasSearchMatchingChild()) setExpanded((old) => !old)

Callers 2

isExpandedFunction · 0.85
toggleExpandedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected