Dialog OnSideClose gets called when opening and closing #1622

Open
opened 2026-01-29 17:56:21 +00:00 by claunia · 1 comment
Owner

Originally created by @sethcalebweeks on GitHub (Feb 17, 2025).

Describe the bug
Dialog OnSideClose gets called when opening and closing.

To Reproduce
Add a handler to OnSideClose for a dialog, and it will be called whenever the side dialog opens and closes. See these lines of code:
a2591f7f77/Radzen.Blazor/DialogService.cs (L171)
a2591f7f77/Radzen.Blazor/DialogService.cs (L193)

Expected behavior
OnSideClose should only be invoked when the side dialog is actually closed.

Additional context
I'm guessing this code is here to make sure any existing side dialogs are closed first. But this should be done in a way that doesn't also call the OnSideClose event. Otherwise, there is no way to actually be notified correctly.

Originally created by @sethcalebweeks on GitHub (Feb 17, 2025). **Describe the bug** Dialog OnSideClose gets called when opening and closing. **To Reproduce** Add a handler to OnSideClose for a dialog, and it will be called whenever the side dialog opens and closes. See these lines of code: https://github.com/radzenhq/radzen-blazor/blob/a2591f7f7725543493bbea92afe7ed1cfe08069b/Radzen.Blazor/DialogService.cs#L171 https://github.com/radzenhq/radzen-blazor/blob/a2591f7f7725543493bbea92afe7ed1cfe08069b/Radzen.Blazor/DialogService.cs#L193 **Expected behavior** OnSideClose should only be invoked when the side dialog is actually closed. **Additional context** I'm guessing this code is here to make sure any existing side dialogs are closed first. But this should be done in a way that doesn't also call the OnSideClose event. Otherwise, there is no way to actually be notified correctly.
Author
Owner

@Horea-Marc commented on GitHub (Mar 18, 2025):

This issue is still persisting in version 6.2.6.
OnSideClose is invoked only when opening the dialog (OpenSideAsync).

@Horea-Marc commented on GitHub (Mar 18, 2025): This issue is still persisting in version 6.2.6. OnSideClose is invoked only when opening the dialog (OpenSideAsync).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1622