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 5219adf commit 70321bfCopy full SHA for 70321bf
packages/main/src/components/AnalyticalTable/hooks/useTableScrollHandles.ts
@@ -10,10 +10,14 @@ export const useTableScrollHandles = (ref) => {
10
if (analyticalTableRef.current) {
11
Object.assign(analyticalTableRef.current, {
12
scrollTo: (offset, align) => {
13
- reactWindowRef.current.scrollToOffset(offset, { align });
+ if (typeof reactWindowRef.current?.scrollToOffset === 'function') {
14
+ reactWindowRef.current.scrollToOffset(offset, { align });
15
+ }
16
},
17
scrollToItem: (index, align) => {
- reactWindowRef.current.scrollToIndex(index, { align });
18
+ if (typeof reactWindowRef.current?.scrollToIndex === 'function') {
19
+ reactWindowRef.current.scrollToIndex(index, { align });
20
21
}
22
});
23
0 commit comments