@implements IDisposable; @inject IEntityDialogService entityDialogService @if (entityDialogService.HasDialog()) { } @code { protected override void OnInitialized() { entityDialogService.Subscribe(OnUpdate); } public void Dispose() { entityDialogService.Unsubscribe(OnUpdate); } void OnUpdate() { StateHasChanged(); } }