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

Method isVisible

packages/react-stately/src/layout/ListLayout.ts:293–301  ·  view source on GitHub ↗
(node: LayoutNode, rect: Rect)

Source from the content-addressed store, hash-verified

291 }
292
293 protected isVisible(node: LayoutNode, rect: Rect): boolean {
294 return (
295 node.layoutInfo.rect.intersects(rect) ||
296 node.layoutInfo.isSticky ||
297 node.layoutInfo.type === 'header' ||
298 node.layoutInfo.type === 'loader' ||
299 this.virtualizer!.isPersistedKey(node.layoutInfo.key)
300 );
301 }
302
303 protected shouldInvalidateEverything(invalidationContext: InvalidationContext<O>): boolean {
304 let options = invalidationContext.layoutOptions;

Callers 1

addNodesMethod · 0.95

Calls 2

isPersistedKeyMethod · 0.80
intersectsMethod · 0.80

Tested by

no test coverage detected