Skip to content

Commit

Permalink
fix: control tooltip open/close behavior (#2285)
Browse files Browse the repository at this point in the history
  • Loading branch information
finnar-bin authored Oct 9, 2023
1 parent feeb0eb commit 5ddb8da
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/shell/components/ResizeableContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const ResizableContainer = ({
`zesty:collapsedContainer:${id}`,
false
);
const [isTooltipOpen, setIsTooltipOpen] = useState(false);

const handleMouseDown = (e: React.MouseEvent) => {
setIsResizing(true);
Expand Down Expand Up @@ -112,10 +113,16 @@ export const ResizableContainer = ({
placement="right-start"
enterDelay={1000}
enterNextDelay={1000}
open={isTooltipOpen}
onOpen={() => setIsTooltipOpen(true)}
onClose={() => setIsTooltipOpen(false)}
>
<IconButton
data-cy="collapseAppSideBar"
onClick={() => setCollapsed(!collapsed)}
onClick={() => {
setIsTooltipOpen(false);
setCollapsed(!collapsed);
}}
sx={{
borderRadius: "50%",
borderColor: "grey.600",
Expand Down

0 comments on commit 5ddb8da

Please sign in to comment.