From 92072fa71c5cee86aac3ec0aaad7c3945d98b170 Mon Sep 17 00:00:00 2001
From: John Barrett <40014477+274188A@users.noreply.github.com>
Date: Thu, 18 Jun 2020 10:15:09 +0800
Subject: [PATCH] Bug Fix: set the Busy flag earlier
The Blazor Lifecycle means we should set the flag a little earlier to avoid an showing the id not found msg before we've had a chance to try and find it
---
ContactsApp.Controls/EditContactControl.razor | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ContactsApp.Controls/EditContactControl.razor b/ContactsApp.Controls/EditContactControl.razor
index f48e6eb..67b0901 100644
--- a/ContactsApp.Controls/EditContactControl.razor
+++ b/ContactsApp.Controls/EditContactControl.razor
@@ -88,13 +88,19 @@ else
/// A .
protected override async Task OnParametersSetAsync()
{
- Service.SetUser(User);
- Busy = true; // start async
+ //Busy = true; // start async
Contact = await Service.Repo.LoadAsync(ContactId, null, true);
Busy = false; // end async
+
await base.OnInitializedAsync();
}
+ public override async Task SetParametersAsync(ParameterView parameters)
+ {
+ Busy = true;
+ await base.SetParametersAsync(parameters);
+ }
+
///
/// Result of form validation.
///