MCPcopy
hub / github.com/bvaughn/react-window / getIndices

Function getIndices

lib/core/getStartStopIndices.test.ts:6–32  ·  view source on GitHub ↗
({
    containerScrollOffset,
    containerSize,
    itemCount,
    itemSize,
    overscanCount = 0
  }: {
    containerScrollOffset: number;
    containerSize: number;
    itemCount: number;
    itemSize: number;
    overscanCount?: number;
  })

Source from the content-addressed store, hash-verified

4
5describe("getStartStopIndices", () => {
6 function getIndices({
7 containerScrollOffset,
8 containerSize,
9 itemCount,
10 itemSize,
11 overscanCount = 0
12 }: {
13 containerScrollOffset: number;
14 containerSize: number;
15 itemCount: number;
16 itemSize: number;
17 overscanCount?: number;
18 }) {
19 const cachedBounds = createCachedBounds({
20 itemCount: itemCount,
21 itemProps: {},
22 itemSize
23 });
24
25 return getStartStopIndices({
26 cachedBounds,
27 containerScrollOffset,
28 containerSize,
29 itemCount,
30 overscanCount
31 });
32 }
33
34 test("empty list", () => {
35 expect(

Callers 1

Calls 2

createCachedBoundsFunction · 0.90
getStartStopIndicesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…