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

Function hasSearchMatchingChild

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

Source from the content-addressed store, hash-verified

479 (props.defaultExpanded || []).includes(props.label),
480 )
481 const hasSearchMatchingChild = () =>
482 !!props.search &&
483 [...props.search.match.children.values()].some((child) => child.hasMatch)
484 const isExpanded = () => expanded() || hasSearchMatchingChild()
485 const toggleExpanded = () => {
486 if (!hasSearchMatchingChild()) setExpanded((old) => !old)

Callers 2

isExpandedFunction · 0.85
toggleExpandedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected