From e9ff7a91bf234290698f8a8c5dcb2ec12125bc74 Mon Sep 17 00:00:00 2001 From: Junhao Liao Date: Tue, 24 Sep 2024 02:11:28 -0400 Subject: [PATCH] Update dependencies for useCallback hooks in SidebarContainer. --- new-log-viewer/src/components/SidebarContainer/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/new-log-viewer/src/components/SidebarContainer/index.tsx b/new-log-viewer/src/components/SidebarContainer/index.tsx index 05b22d8a..8b54ea5d 100644 --- a/new-log-viewer/src/components/SidebarContainer/index.tsx +++ b/new-log-viewer/src/components/SidebarContainer/index.tsx @@ -71,13 +71,16 @@ const SidebarContainer = ({children}: SidebarContainerProps) => { setActiveTabName(tabName); setPanelWidth(PANEL_DEFAULT_WIDTH_IN_PIXEL); document.body.style.setProperty("--ylv-panel-resize-handle-width", "3px"); - }, [activeTabName]); + }, [ + activeTabName, + deactivateTabAndHideResizeHandle, + ]); const handleResizeHandleRelease = useCallback(() => { if (getPanelWidth() === tabListRef.current?.clientWidth) { deactivateTabAndHideResizeHandle(); } - }, []); + }, [deactivateTabAndHideResizeHandle]); const handleResize = useCallback((resizeHandlePosition: number) => { if (null === tabListRef.current) {