Commit 14be514
fix(app-admin): call onClose callback when dialog is closed
The useDialogs hook was not triggering the onClose callback when dialogs
were dismissed. The closeDialog function in DialogsContext only removed
the dialog from state without executing the user-provided onClose callback.
This fix retrieves the dialog from state before removal and calls the
onClose callback if it exists, ensuring proper cleanup and event handling
when dialogs are closed through any method (cancel button, accept button,
or programmatic closure).1 parent ef7e311 commit 14be514
File tree
1 file changed
+12
-0
lines changed- packages/app-admin/src/components/Dialogs
1 file changed
+12
-0
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
| |||
0 commit comments