Updated conditions for Deselect and Unhide

This commit is contained in:
Eugene ;) 2020-07-28 17:31:57 +02:00
parent 463bddc91d
commit cd7ebf6cce
2 changed files with 3 additions and 3 deletions

View File

@ -18,8 +18,8 @@ namespace Seenginx.Models
public bool CanBeDeleted { get; set; } = true;
public void Hide() { IsVisible = "is-hidden"; }
public void Unhide() { IsVisible = string.Empty; }
public void Unhide() { IsVisible = null; }
public void Select() { IsSelected = "isSelected"; }
public void Deselect() { IsSelected = string.Empty; }
public void Deselect() { IsSelected = null; }
}
}

View File

@ -104,7 +104,7 @@ namespace Seenginx.Components
protected async Task OnFileCloseClick(MouseEventArgs e)
{
Files.ForEach(f => f.Deselect());
Files.ForEach(f => { if (f.IsSelected != null) f.Deselect(); });
SelectedFile = null;
await JsRuntime.InvokeVoidAsync("ClearEditor");
IsDraftMode = false;