Browse Source

Updated conditions for Deselect and Unhide

master
Eugene ;) 2 years ago
parent
commit
cd7ebf6cce
  1. 4
      Seenginx.Models/ConfigFile.cs
  2. 2
      Seenginx/Components/FilesWithEditor.razor.cs

4
Seenginx.Models/ConfigFile.cs

@ -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; }
}
}

2
Seenginx/Components/FilesWithEditor.razor.cs

@ -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;

Loading…
Cancel
Save