From 8de8d7cfdc3ad76248442799d23bf1c2ec89bc17 Mon Sep 17 00:00:00 2001 From: Pat Hartl Date: Mon, 11 Sep 2023 02:06:59 -0500 Subject: [PATCH] Fix selecting file in archive file picker --- LANCommander/Components/ArchiveFilePicker.razor | 4 +++- .../Components/FileManagerComponents/FileManager.razor | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/LANCommander/Components/ArchiveFilePicker.razor b/LANCommander/Components/ArchiveFilePicker.razor index 68a5f26..38e16dd 100644 --- a/LANCommander/Components/ArchiveFilePicker.razor +++ b/LANCommander/Components/ArchiveFilePicker.razor @@ -56,7 +56,9 @@ modalRef.OnOk = async (results) => { if (!String.IsNullOrWhiteSpace(Prefix)) - Value = "{InstallDir}/" + results.FirstOrDefault().Path; + Value = "{InstallDir}/" + results?.FirstOrDefault()?.Path; + else + Value = results?.FirstOrDefault()?.Path; if (ValueChanged.HasDelegate) await ValueChanged.InvokeAsync(Value); diff --git a/LANCommander/Components/FileManagerComponents/FileManager.razor b/LANCommander/Components/FileManagerComponents/FileManager.razor index 2df58c6..c975e6f 100644 --- a/LANCommander/Components/FileManagerComponents/FileManager.razor +++ b/LANCommander/Components/FileManagerComponents/FileManager.razor @@ -125,7 +125,7 @@ HidePagination="true" Loading="Entries == null" OnRow="OnRow" - @bind-SelectedRows="Selected" + SelectedRowsChanged="SelectedChanged" RowSelectable="EntrySelectable" Size="@TableSize.Small">