MCPcopy Create free account
hub / github.com/bvaughn/react-window / DynamicExample

Function DynamicExample

lib/components/virtualizer/useVirtualizer.test.tsx:234–248  ·  view source on GitHub ↗
({
      virtualizerRef
    }: {
      virtualizerRef?: Ref<Virtualizer>;
    })

Source from the content-addressed store, hash-verified

232
233 describe("dynamic item sizes", () => {
234 function DynamicExample({
235 virtualizerRef
236 }: {
237 virtualizerRef?: Ref<Virtualizer>;
238 }) {
239 const itemSize = useDynamicRowHeight({ defaultRowHeight: 25 });
240 return (
241 <Example
242 count={100}
243 itemSize={itemSize}
244 overscanCount={0}
245 virtualizerRef={virtualizerRef}
246 />
247 );
248 }
249
250 test("should measure items passed to measureElement", () => {
251 // Items measure 25px (the estimated size) unless specified;

Callers

nothing calls this directly

Calls 1

useDynamicRowHeightFunction · 0.90

Tested by

no test coverage detected