MCPcopy Create free account
hub / github.com/adobe/react-spectrum / isVisible

Method isVisible

packages/@react-spectrum/ai/src/ListLayout.ts:376–384  ·  view source on GitHub ↗
(node: LayoutNode, rect: Rect)

Source from the content-addressed store, hash-verified

374 }
375
376 protected isVisible(node: LayoutNode, rect: Rect): boolean {
377 return (
378 node.layoutInfo.rect.intersects(rect) ||
379 node.layoutInfo.isSticky ||
380 node.layoutInfo.type === 'header' ||
381 node.layoutInfo.type === 'loader' ||
382 this.virtualizer!.isPersistedKey(node.layoutInfo.key)
383 );
384 }
385
386 protected shouldInvalidateEverything(invalidationContext: InvalidationContext<O>): boolean {
387 // Invalidate cache if the cross-axis size of the collection changed (e.g. width, for a

Callers 1

addNodesMethod · 0.95

Calls 2

isPersistedKeyMethod · 0.80
intersectsMethod · 0.80

Tested by

no test coverage detected