Disable smooth scrolling

Signed-off-by: alexfront <alex.andreev.email@gmail.com>
This commit is contained in:
alexfront committed 2022-09-09 11:04:24 +03:00
1 parent e82f83fa5a
commit aeb0127a8f
1 file changed
+2 -5
@@ -29,12 +29,14 @@ export const LogList = observer(({ model }: LogListProps) => {
const topLineRef = useRef<HTMLDivElement>(null); const topLineRef = useRef<HTMLDivElement>(null);
const bottomLineRef = useRef<HTMLDivElement>(null); const bottomLineRef = useRef<HTMLDivElement>(null);
const [toBottomVisible, setButtonVisibility] = useJumpToBottomButton(parentRef.current); const [toBottomVisible, setButtonVisibility] = useJumpToBottomButton(parentRef.current);
const uniqRowKey = useRefreshListOnDataChange(model.logTabData.get());
const rowVirtualizer = useVirtualizer({ const rowVirtualizer = useVirtualizer({
count: visibleLogs.get().length, count: visibleLogs.get().length,
getScrollElement: () => parentRef.current, getScrollElement: () => parentRef.current,
estimateSize: () => 38, estimateSize: () => 38,
overscan: 5, overscan: 5,
enableSmoothScroll: false,
}); });
const scrollTo = (index: number) => { const scrollTo = (index: number) => {
@@ -52,13 +54,8 @@ export const LogList = observer(({ model }: LogListProps) => {
}; };
useInitialScrollToBottom(model, scrollToBottom); useInitialScrollToBottom(model, scrollToBottom);
const uniqRowKey = useRefreshListOnDataChange(model.logTabData.get());
useScrollOnSearch(model.searchStore, scrollTo); useScrollOnSearch(model.searchStore, scrollTo);
useStickToBottomOnLogsLoad({ bottomLineRef, model, scrollToBottom }); useStickToBottomOnLogsLoad({ bottomLineRef, model, scrollToBottom });
useOnScrollTop({ topLineRef, model, scrollTo }); useOnScrollTop({ topLineRef, model, scrollTo });
return ( return (