We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b72776c commit 32933e5Copy full SHA for 32933e5
src/Table.tsx
@@ -328,7 +328,16 @@ function Table<RecordType extends DefaultRecordType>(
328
});
329
} else {
330
const mergedKey = key ?? getRowKey(mergedData[index]);
331
- scrollBodyRef.current.querySelector(`[data-row-key="${mergedKey}"]`)?.scrollIntoView();
+ const { offsetTop } =
332
+ (scrollBodyRef.current.querySelector(
333
+ `[data-row-key="${mergedKey}"]`,
334
+ ) as HTMLElement) || {};
335
+
336
+ if (offsetTop !== undefined) {
337
+ scrollBodyRef.current?.scrollTo({
338
+ top: offsetTop,
339
+ });
340
+ }
341
}
342
} else if ((scrollBodyRef.current as any)?.scrollTo) {
343
// Pass to proxy
0 commit comments