fix(uns): re-entrancy guard + clear stale error + PageTitle on GlobalUns (review)

This commit is contained in:
Joseph Doherty
2026-06-08 12:39:23 -04:00
parent 47b1d2259f
commit 4a32edef1a
@@ -5,6 +5,8 @@
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Uns
@inject IUnsTreeService Svc
<PageTitle>UNS</PageTitle>
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="mb-0">UNS</h4>
<span class="text-muted small">Changes apply on the next deployment.</span>
@@ -58,10 +60,13 @@
/// </summary>
private async Task ToggleAsync(UnsNode node)
{
if (node.Loading) return;
node.Expanded = !node.Expanded;
if (node.Kind == UnsNodeKind.Equipment && node.Expanded && !node.Loaded)
{
node.Error = null;
node.Loading = true;
StateHasChanged();
try