There was an error while loading. Please reload this page.
1 parent fb8957b commit cde8729Copy full SHA for cde8729
1 file changed
fission/src/ui/UIProvider.tsx
@@ -309,15 +309,18 @@ export const UIProvider: React.FC<UIProviderProps> = ({ children }) => {
309
if ("exclusiveGroup" in screen.props) {
310
const exclusiveGroup = screen.props.exclusiveGroup
311
if (exclusiveGroup != null) {
312
- const existing = panels.find(p => p.props.exclusiveGroup == exclusiveGroup && p !== screen)
313
- if (existing) {
314
- closePanel(existing.id, CloseType.OVERWRITE)
315
- }
+ setPanels(panels => {
+ const existing = panels.find(p => p.props.exclusiveGroup == exclusiveGroup && p !== screen)
+ if (existing) {
+ closePanel(existing.id, CloseType.OVERWRITE)
316
+ }
317
+ return panels
318
+ })
319
}
320
321
refresh()
322
},
- [closePanel, panels]
323
+ [closePanel]
324
)
325
326
return (
0 commit comments