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

Method isVisible

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

Source from the content-addressed store, hash-verified

350 }
351
352 protected isVisible(node: LayoutNode, rect: Rect): boolean {
353 return (
354 node.layoutInfo.rect.intersects(rect) ||
355 node.layoutInfo.isSticky ||
356 node.layoutInfo.type === 'header' ||
357 node.layoutInfo.type === 'loader' ||
358 this.virtualizer!.isPersistedKey(node.layoutInfo.key)
359 );
360 }
361
362 protected shouldInvalidateEverything(invalidationContext: InvalidationContext<O>): boolean {
363 // 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