MCPcopy Create free account
hub / github.com/TanStack/query / resizeRow

Function resizeRow

packages/query-devtools/src/__tests__/VirtualList.test.tsx:37–54  ·  view source on GitHub ↗
(element: HTMLElement, height: number)

Source from the content-addressed store, hash-verified

35 })
36
37 function resizeRow(element: HTMLElement, height: number) {
38 for (const { callback, observer, targets } of observers) {
39 if (!targets.has(element)) continue
40 const size = [{ blockSize: height, inlineSize: 1000 }]
41 callback(
42 [
43 {
44 target: element,
45 contentRect: new DOMRectReadOnly(0, 0, 1000, height),
46 borderBoxSize: size,
47 contentBoxSize: size,
48 devicePixelContentBoxSize: size,
49 },
50 ],
51 observer,
52 )
53 }
54 }
55
56 function renderList() {
57 const original = Array.from({ length: 2000 }, (_, index) => ({

Callers 1

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected