diff --git a/Components/EditPicDialog.razor b/Components/EditPicDialog.razor index 84d4fdf..a8b6f30 100644 --- a/Components/EditPicDialog.razor +++ b/Components/EditPicDialog.razor @@ -4,7 +4,9 @@
- +
+ +
@@ -32,8 +34,10 @@ set { _pic = value; Description = _pic?.Description; + InvokeAsync(StateHasChanged); } } + public string? Description { get; set; } private bool loading = false; [Parameter] @@ -47,7 +51,7 @@ loading = true; await InvokeAsync(StateHasChanged); - if(!string.IsNullOrEmpty(Pic.Id)) { + if(!string.IsNullOrEmpty(Pic?.Id)) { await api.PostPicDescription(State.SelectedAddressName, Pic.Id, Description); await State.RefreshPics(); await InvokeAsync(StateHasChanged); diff --git a/Components/PicCard.razor b/Components/PicCard.razor index 5bf628c..c1fb02c 100644 --- a/Components/PicCard.razor +++ b/Components/PicCard.razor @@ -43,7 +43,7 @@ private async Task EditPic(EventArgs e){ Dialog.Pic = Pic; - // await InvokeAsync(StateHasChanged); + await InvokeAsync(StateHasChanged); await JS.InvokeVoidAsync("ui", "#" + Dialog?.id); }