Skip to content

Commit

Permalink
Update dependencies for useCallback hooks in SidebarContainer.
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao committed Sep 24, 2024
1 parent 68adc0c commit e9ff7a9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions new-log-viewer/src/components/SidebarContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e9ff7a9

Please sign in to comment.