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

Function scrollToRow

lib/components/grid/Grid.tsx:177–193  ·  view source on GitHub ↗
({
        align = "auto",
        behavior = "auto",
        index
      }: {
        align?: Align;
        behavior?: ScrollBehavior;
        index: number;
      })

Source from the content-addressed store, hash-verified

175 },
176
177 scrollToRow({
178 align = "auto",
179 behavior = "auto",
180 index
181 }: {
182 align?: Align;
183 behavior?: ScrollBehavior;
184 index: number;
185 }) {
186 const row = getRowScrollPosition({ align, index });
187 if (row) {
188 scrollTargetTo(row.scrollTarget, {
189 behavior,
190 top: row.scrollOffset
191 });
192 }
193 }
194 }),
195 [element, getColumnScrollPosition, getRowScrollPosition]
196 );

Callers

nothing calls this directly

Calls 1

scrollTargetToFunction · 0.90

Tested by

no test coverage detected