Skip to content

Commit cde8729

Browse files
committed
fix: make configure panel work again
1 parent fb8957b commit cde8729

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

fission/src/ui/UIProvider.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,18 @@ export const UIProvider: React.FC<UIProviderProps> = ({ children }) => {
309309
if ("exclusiveGroup" in screen.props) {
310310
const exclusiveGroup = screen.props.exclusiveGroup
311311
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-
}
312+
setPanels(panels => {
313+
const existing = panels.find(p => p.props.exclusiveGroup == exclusiveGroup && p !== screen)
314+
if (existing) {
315+
closePanel(existing.id, CloseType.OVERWRITE)
316+
}
317+
return panels
318+
})
316319
}
317320
}
318321
refresh()
319322
},
320-
[closePanel, panels]
323+
[closePanel]
321324
)
322325

323326
return (

0 commit comments

Comments
 (0)