Skip to content

Commit d6039d5

Browse files
authored
Merge branch 'dev-v5' into enhance-playwright
2 parents f58e1d9 + bcbbe29 commit d6039d5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Core/Components/Dialog/FluentDialog.razor.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ namespace Microsoft.FluentUI.AspNetCore.Components;
1616
/// </summary>
1717
public 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
{

0 commit comments

Comments
 (0)