diff --git a/LANCommander/Components/TagsInput.razor b/LANCommander/Components/TagsInput.razor index f92fca0..9e11b5f 100644 --- a/LANCommander/Components/TagsInput.razor +++ b/LANCommander/Components/TagsInput.razor @@ -45,7 +45,7 @@ } if (ValuesChanged.HasDelegate) - await ValuesChanged.InvokeAsync(); + await ValuesChanged.InvokeAsync(Values); StateHasChanged(); } diff --git a/LANCommander/Pages/Games/Edit.razor b/LANCommander/Pages/Games/Edit.razor index 873cc68..22c85f6 100644 --- a/LANCommander/Pages/Games/Edit.razor +++ b/LANCommander/Pages/Games/Edit.razor @@ -161,6 +161,7 @@ else [Parameter] public Guid Id { get; set; } [Parameter] public string Panel { get; set; } + bool Loaded = false; bool Success; 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) Game = new Game(); else @@ -223,6 +229,8 @@ else Description = r.Description, Key = r.Id.ToString() }); + + Loaded = true; } private async Task Save()