Fix selecting file in archive file picker

dhcp-server
Pat Hartl 2023-09-11 02:06:59 -05:00
parent 3b7a0db74e
commit 8de8d7cfdc
2 changed files with 4 additions and 2 deletions

View File

@ -56,7 +56,9 @@
modalRef.OnOk = async (results) => modalRef.OnOk = async (results) =>
{ {
if (!String.IsNullOrWhiteSpace(Prefix)) if (!String.IsNullOrWhiteSpace(Prefix))
Value = "{InstallDir}/" + results.FirstOrDefault().Path; Value = "{InstallDir}/" + results?.FirstOrDefault()?.Path;
else
Value = results?.FirstOrDefault()?.Path;
if (ValueChanged.HasDelegate) if (ValueChanged.HasDelegate)
await ValueChanged.InvokeAsync(Value); await ValueChanged.InvokeAsync(Value);

View File

@ -125,7 +125,7 @@
HidePagination="true" HidePagination="true"
Loading="Entries == null" Loading="Entries == null"
OnRow="OnRow" OnRow="OnRow"
@bind-SelectedRows="Selected" SelectedRowsChanged="SelectedChanged"
RowSelectable="EntrySelectable" RowSelectable="EntrySelectable"
Size="@TableSize.Small"> Size="@TableSize.Small">
<Selection Key="@context.Path" Type="@(SelectMultiple ? "checkbox" : "radio")" /> <Selection Key="@context.Path" Type="@(SelectMultiple ? "checkbox" : "radio")" />