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

Function getSize

packages/react-aria/src/virtualizer/useVirtualizerItem.ts:92–99  ·  view source on GitHub ↗
(node: HTMLElement)

Source from the content-addressed store, hash-verified

90}
91
92function getSize(node: HTMLElement): Size {
93 // Reset height before measuring so we get the intrinsic size
94 let height = node.style.height;
95 node.style.height = '';
96 let size = new Size(node.scrollWidth, node.scrollHeight);
97 node.style.height = height;
98 return size;
99}

Callers 1

useVirtualizerItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected