Load data a little later on game edit screen. Fix TagsInput sometimes losing data.
parent
171f82df3e
commit
50eff6784f
|
@ -45,7 +45,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ValuesChanged.HasDelegate)
|
if (ValuesChanged.HasDelegate)
|
||||||
await ValuesChanged.InvokeAsync();
|
await ValuesChanged.InvokeAsync(Values);
|
||||||
|
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,6 +161,7 @@ else
|
||||||
[Parameter] public Guid Id { get; set; }
|
[Parameter] public Guid Id { get; set; }
|
||||||
[Parameter] public string Panel { get; set; }
|
[Parameter] public string Panel { get; set; }
|
||||||
|
|
||||||
|
bool Loaded = false;
|
||||||
bool Success;
|
bool Success;
|
||||||
string[] Errors = { };
|
string[] Errors = { };
|
||||||
|
|
||||||
|
@ -206,8 +207,13 @@ else
|
||||||
});
|
});
|
||||||
} }
|
} }
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
|
if (!Loaded)
|
||||||
|
await LoadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task LoadData() {
|
||||||
if (Id == Guid.Empty)
|
if (Id == Guid.Empty)
|
||||||
Game = new Game();
|
Game = new Game();
|
||||||
else
|
else
|
||||||
|
@ -223,6 +229,8 @@ else
|
||||||
Description = r.Description,
|
Description = r.Description,
|
||||||
Key = r.Id.ToString()
|
Key = r.Id.ToString()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Save()
|
private async Task Save()
|
||||||
|
|
Loading…
Reference in New Issue