MCPcopy Create free account
hub / github.com/bvaughn/react-virtualized / getInnerSizes

Function getInnerSizes

lib/components/MultiGrid/MultiGrid.test.tsx:275–290  ·  view source on GitHub ↗
(multiGrid: MultiGridImperativeAPI)

Source from the content-addressed store, hash-verified

273
274 // Sizes of the inner Grids' content (once all cells have been measured)
275 function getInnerSizes(multiGrid: MultiGridImperativeAPI) {
276 act(() => {
277 multiGrid.measureAllCells();
278 multiGrid.forceUpdateGrids();
279 });
280 const [, topRight, bottomLeft, bottomRight] =
281 document.body.querySelectorAll<HTMLElement>(
282 ".ReactVirtualized__Grid__innerScrollContainer"
283 );
284 return {
285 bottomLeftHeight: parseInt(bottomLeft.style.height, 10),
286 bottomRightHeight: parseInt(bottomRight.style.height, 10),
287 bottomRightWidth: parseInt(bottomRight.style.width, 10),
288 topRightWidth: parseInt(topRight.style.width, 10)
289 };
290 }
291
292 it("should give the bottom-left Grid an extra row for the main Grid's horizontal scrollbar", () => {
293 const onScrollbarPresenceChange = vi.fn();

Callers 1

MultiGrid.test.tsxFile · 0.85

Calls 2

forceUpdateGridsMethod · 0.80
measureAllCellsMethod · 0.65

Tested by

no test coverage detected