Disable select button when nothing is selected

This commit is contained in:
Pat Hartl 2023-03-20 21:03:06 -05:00
parent e5ba574468
commit 266864338d

View file

@ -10,7 +10,7 @@
@{ @{
RenderFragment Footer = RenderFragment Footer =
@<Template> @<Template>
<Button OnClick="SelectGame" Disabled="@(Loading || Results.Count() == 0)" Type="@ButtonType.Primary">Select</Button> <Button OnClick="SelectGame" Disabled="@(Loading || (SelectedResults != null && SelectedResults.Count() == 0) || Results.Count() == 0)" Type="@ButtonType.Primary">Select</Button>
<Button OnClick="() => ModalVisible = false">Cancel</Button> <Button OnClick="() => ModalVisible = false">Cancel</Button>
</Template>; </Template>;
} }