diff --git a/src/renderer/src/modules/entry-column/index.tsx b/src/renderer/src/modules/entry-column/index.tsx index 2094e5e32..6abd7d5fb 100644 --- a/src/renderer/src/modules/entry-column/index.tsx +++ b/src/renderer/src/modules/entry-column/index.tsx @@ -61,7 +61,7 @@ export function EntryColumn() { const virtuosoRef = useRef(null) const entries = useEntriesByView({ onReset: useCallback(() => { - virtuosoRef.current?.scrollIntoView({ + virtuosoRef.current?.scrollIntoView?.({ index: 0, }) }, []), @@ -411,7 +411,7 @@ const EntryList: FC & { const nextIndex = Math.min(currentActiveEntryIndex + 1, data.length - 1) - virtuosoOptions.virtuosoRef.current?.scrollIntoView({ + virtuosoOptions.virtuosoRef.current?.scrollIntoView?.({ index: nextIndex, }) const nextId = data![nextIndex] @@ -435,7 +435,7 @@ const EntryList: FC & { data.length - 1 : Math.max(0, currentActiveEntryIndex - 1) - virtuosoOptions.virtuosoRef.current?.scrollIntoView({ + virtuosoOptions.virtuosoRef.current?.scrollIntoView?.({ index: nextIndex, }) const nextId = data![nextIndex]