From 4573535cce9c12b50e7c8110aaa9c2aee05d8a73 Mon Sep 17 00:00:00 2001 From: "blazej.kuhajda" Date: Wed, 6 Dec 2023 10:45:43 +0100 Subject: [PATCH] issue - cyclic popover --- .../AxoMessenger/Static/AxoMessengerDetailedView.razor.cs | 7 +++++-- .../AxoMessenger/Static/AxoMessengerView.razor.cs | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/core/src/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerDetailedView.razor.cs b/src/core/src/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerDetailedView.razor.cs index 606eee22b..4c7c88bd8 100644 --- a/src/core/src/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerDetailedView.razor.cs +++ b/src/core/src/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerDetailedView.razor.cs @@ -21,8 +21,11 @@ public partial class AxoMessengerDetailedView : RenderableComplexComponentBase("import", "./_content/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerView.razor.js"); - await jsObject.InvokeVoidAsync("addPopovers"); + if (firstRender) + { + var jsObject = await js.InvokeAsync("import", "./_content/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerView.razor.js"); + await jsObject.InvokeVoidAsync("addPopovers"); + } } protected async Task GetCurrentUserName() diff --git a/src/core/src/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerView.razor.cs b/src/core/src/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerView.razor.cs index 533479807..6ee20ff86 100644 --- a/src/core/src/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerView.razor.cs +++ b/src/core/src/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerView.razor.cs @@ -21,8 +21,11 @@ public partial class AxoMessengerView : RenderableComplexComponentBase("import", "./_content/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerView.razor.js"); - await jsObject.InvokeVoidAsync("addPopovers"); + if (firstRender) + { + var jsObject = await js.InvokeAsync("import", "./_content/AXOpen.Core.Blazor/AxoMessenger/Static/AxoMessengerView.razor.js"); + await jsObject.InvokeVoidAsync("addPopovers"); + } } protected async Task GetCurrentUserName()