From ef1fa7e8642164c753aa8e87d7bf7d9098a6e683 Mon Sep 17 00:00:00 2001 From: Jonathan McCaffrey Date: Mon, 18 Apr 2022 21:55:14 -0400 Subject: [PATCH] fix(Search) Fixed search auto focus, plus some WIP code --- Components/Form/FormTextComponent.razor | 6 +++ IGP/Dialog/SearchDialogComponent.razor | 34 +++++++++---- .../Parts/OptionsComponent.razor | 49 ++++++++++++++----- Model/BuildOrders/BuildOrderModel.cs | 2 + .../BuildOrders/TrainingCapacityUsedModel.cs | 13 +++++ Services/IServices.cs | 1 + Services/Immortal/BuildOrderService.cs | 46 +++++++++++++++-- 7 files changed, 126 insertions(+), 25 deletions(-) create mode 100644 Model/BuildOrders/TrainingCapacityUsedModel.cs diff --git a/Components/Form/FormTextComponent.razor b/Components/Form/FormTextComponent.razor index 069dfcb..aa43c82 100644 --- a/Components/Form/FormTextComponent.razor +++ b/Components/Form/FormTextComponent.razor @@ -12,6 +12,7 @@ type="text" value="@Value" id="@Id" + @onfocus="OnFocus" @oninput="OnInput" @onchange="OnChange"/> @@ -65,9 +66,13 @@ [Parameter] public EventCallback OnInput { get; set; } + [Parameter] public EventCallback OnChange { get; set; } + + [Parameter] + public EventCallback OnFocus { get; set; } [Parameter] @@ -83,4 +88,5 @@ labelId = Label.ToLower().Replace(" ", "_"); } + } \ No newline at end of file diff --git a/IGP/Dialog/SearchDialogComponent.razor b/IGP/Dialog/SearchDialogComponent.razor index e91b3bc..08c50bb 100644 --- a/IGP/Dialog/SearchDialogComponent.razor +++ b/IGP/Dialog/SearchDialogComponent.razor @@ -1,4 +1,5 @@ -@implements IDisposable; +@using System.Timers +@implements IDisposable; @inject ISearchService searchService @inject IJSRuntime jsRuntime @@ -13,7 +14,7 @@ @onclick:stopPropagation="true"> - +