File tree Expand file tree Collapse file tree
src/Core/Components/Dialog Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ namespace Microsoft.FluentUI.AspNetCore.Components;
1616/// </summary>
1717public partial class FluentDialog : FluentComponentBase
1818{
19+ private string ? _shownInstanceId ;
20+
1921 /// <summary />
2022 [ DynamicDependency ( nameof ( OnToggleAsync ) ) ]
2123 [ DynamicDependency ( DynamicallyAccessedMemberTypes . All , typeof ( DialogToggleEventArgs ) ) ]
@@ -78,8 +80,10 @@ public FluentDialog(LibraryConfiguration configuration) : base(configuration)
7880 /// <summary />
7981 protected override Task OnAfterRenderAsync ( bool firstRender )
8082 {
81- if ( firstRender && LaunchedFromService )
83+ var shouldShowDialog = string . CompareOrdinal ( _shownInstanceId , Instance ? . Id ) != 0 ;
84+ if ( shouldShowDialog && LaunchedFromService )
8285 {
86+ _shownInstanceId = Instance ? . Id ;
8387 var instance = Instance as DialogInstance ;
8488 if ( instance is not null )
8589 {
You can’t perform that action at this time.
0 commit comments