diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor index 410062d..9f9a6d3 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor @@ -7,6 +7,7 @@ placeholder="@Placeholder" disabled="@IsDisable" style="@(IsDisable ? "pointer-events: none" : "")" + onClick="this.select();" @bind=@Text @bind:event="oninput" @bind:after="HandleTextChanged" diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/SelectSearch/SelectSearch.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/SelectSearch/SelectSearch.razor.cs index 4e78122..c338da0 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/SelectSearch/SelectSearch.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/SelectSearch/SelectSearch.razor.cs @@ -55,7 +55,8 @@ public partial class SelectSearch { Values = []; Select?.Close(); - await ValuesChanged.InvokeAsync([.. Values]); + SearchInput?.SetText(string.Empty); + await ValuesChanged.InvokeAsync([]); } private void HandleFocusIn() @@ -80,5 +81,10 @@ public partial class SelectSearch )) .ThenBy(game => SelectParams.GetItemLabel(game).Length)]; } + else + { + SelectParams.Items = Items; + SearchInput?.SetText(string.Join(", ", Values?.Select(GetLabel) ?? [])); + } } } \ No newline at end of file diff --git a/src/GameIdeas/GameIdeas.Shared/Constants/GlobalConstants.cs b/src/GameIdeas/GameIdeas.Shared/Constants/GlobalConstants.cs index 0620bdd..801c7cb 100644 --- a/src/GameIdeas/GameIdeas.Shared/Constants/GlobalConstants.cs +++ b/src/GameIdeas/GameIdeas.Shared/Constants/GlobalConstants.cs @@ -22,7 +22,7 @@ public class GlobalConstants public const int API_PORT = 8000; public const string SUB_DOMAIN_NAME = "api-"; - public const double DELAY_INPUT_MS = 500; + public const double DELAY_INPUT_MS = 450; public const int MAX_DESCRIPTION_LENGTH = 350; }