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

Function resize

lib/utils/test/scrollElement.ts:244–257  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

242 contentAbove.style.height = `${offset}px`;
243 },
244 resize(size) {
245 const rect = containerRects.get(element)!;
246 const newRect = { ...rect, ...size };
247 containerRects.set(element, newRect);
248 element.style.height = `${newRect.height}px`;
249 element.style.width = `${newRect.width}px`;
250 act(() => {
251 setElementSize({
252 element,
253 height: newRect.height,
254 width: newRect.width
255 });
256 });
257 },
258 scroll(scrollTop, scrollLeft = element.scrollLeft) {
259 act(() => {
260 scrollTo(scrollLeft, scrollTop);

Callers

nothing calls this directly

Calls 2

setElementSizeFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected