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

Function PendingScrollExample

lib/components/list/List.test.tsx:1080–1091  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1078 const now = vi.spyOn(performance, "now").mockReturnValue(0);
1079 const listRef = createRef<ListImperativeAPI>();
1080 function PendingScrollExample() {
1081 const rowHeight = useDynamicRowHeight({ defaultRowHeight: 25 });
1082 return (
1083 <List
1084 listRef={listRef}
1085 rowCount={100}
1086 rowHeight={rowHeight}
1087 rowComponent={RowComponent}
1088 rowProps={EMPTY_OBJECT}
1089 />
1090 );
1091 }
1092 const { unmount } = render(<PendingScrollExample />);
1093 try {
1094 act(() => listRef.current?.scrollToRow({ index: 50 }));

Callers

nothing calls this directly

Calls 1

useDynamicRowHeightFunction · 0.90

Tested by

no test coverage detected