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

Function scrollToColumn

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

Source from the content-addressed store, hash-verified

140 },
141
142 scrollToColumn({
143 align = "auto",
144 behavior = "auto",
145 index
146 }: {
147 align?: Align;
148 behavior?: ScrollBehavior;
149 index: number;
150 }) {
151 const left = scrollToColumnIndex({
152 align,
153 containerScrollOffset: element?.scrollLeft ?? 0,
154 index
155 });
156
157 if (typeof element?.scrollTo === "function") {
158 element.scrollTo({
159 behavior,
160 left
161 });
162 }
163 },
164
165 scrollToRow({
166 align = "auto",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected