Skip to content

Commit 09ba02b

Browse files
committed
make the overlays example one that could repro the bug
1 parent 5c021f8 commit 09ba02b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

examples/flyout_system/public/components/_flyout_with_overlays.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ const FlyoutContent: React.FC<FlyoutContentProps> = React.memo((props) => {
138138
}, [childFlyoutRefB]);
139139

140140
const openChildFlyoutA = useCallback(() => {
141-
handleCloseChildFlyoutB(); // Ensure only one child flyout is open at a time
142141
childFlyoutRefA.current = overlays.openSystemFlyout(
143142
<ChildFlyoutContent childSize={childSize} childMaxWidth={childMaxWidth} />,
144143
{
@@ -163,10 +162,9 @@ const FlyoutContent: React.FC<FlyoutContentProps> = React.memo((props) => {
163162
}
164163
);
165164
setIsChildFlyoutAOpen(true);
166-
}, [childSize, childMaxWidth, overlays, title, childFlyoutRefA, handleCloseChildFlyoutB]);
165+
}, [childSize, childMaxWidth, overlays, title, childFlyoutRefA]);
167166

168167
const openChildFlyoutB = useCallback(() => {
169-
handleCloseChildFlyoutA(); // Ensure only one child flyout is open at a time
170168
childFlyoutRefB.current = overlays.openSystemFlyout(
171169
<ChildFlyoutContent childSize={childSize} childMaxWidth={childMaxWidth} />,
172170
{
@@ -191,7 +189,7 @@ const FlyoutContent: React.FC<FlyoutContentProps> = React.memo((props) => {
191189
}
192190
);
193191
setIsChildFlyoutBOpen(true);
194-
}, [childSize, childMaxWidth, overlays, title, childFlyoutRefB, handleCloseChildFlyoutA]);
192+
}, [childSize, childMaxWidth, overlays, title, childFlyoutRefB]);
195193

196194
return (
197195
<>

0 commit comments

Comments
 (0)