Edit pic fixes
This commit is contained in:
parent
e4212c9436
commit
518f181c4f
2 changed files with 7 additions and 3 deletions
|
@ -4,7 +4,9 @@
|
|||
|
||||
<div class="overlay" data-ui="#@id"></div>
|
||||
<dialog id="@id">
|
||||
<img src="@Pic?.Url" />
|
||||
<div class="padding center-align">
|
||||
<img src="@Pic?.Url" class="small-height square" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="field textarea label border max">
|
||||
<InputTextArea @bind-Value="Description"></InputTextArea>
|
||||
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue