From 2a5dd22b1fa5753221c7bfe549c80f5770b9b1ba Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Fri, 12 Apr 2024 20:38:03 +0330 Subject: [PATCH] feat(infra): change FocusInput method of SearchBox to FocusAsync #7364 (#7365) --- .../Components/Pages/Todo/TodoPage.razor.cs | 2 +- .../Pages/Butil/Butil06KeyboardPage.razor.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Todo/TodoPage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Todo/TodoPage.razor.cs index 1aa0746eeb..658db36349 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Todo/TodoPage.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Todo/TodoPage.razor.cs @@ -24,7 +24,7 @@ public partial class TodoPage protected override async Task OnInitAsync() { - _ = keyboard.Add(ButilKeyCodes.KeyF, () => _ = searchBox.FocusInput(), ButilModifiers.Ctrl); + _ = keyboard.Add(ButilKeyCodes.KeyF, () => _ = searchBox.FocusAsync(), ButilModifiers.Ctrl); selectedFilter = nameof(AppStrings.All); selectedSort = nameof(AppStrings.Alphabetical); diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor.cs index 331eb0c8cf..eda8a3df6f 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Butil/Butil06KeyboardPage.razor.cs @@ -9,7 +9,7 @@ public partial class Butil06KeyboardPage protected override async Task OnInitAsync() { - await keyboard.Add(ButilKeyCodes.KeyF, () => _ = searchBox.FocusInput(), ButilModifiers.Ctrl); + await keyboard.Add(ButilKeyCodes.KeyF, () => _ = searchBox.FocusAsync(), ButilModifiers.Ctrl); } @@ -25,7 +25,7 @@ protected override async Task OnInitAsync() protected override async Task OnInitAsync() { - await keyboard.Add(ButilKeyCodes.KeyF, () => _ = searchBox.FocusInput(), ButilModifiers.Ctrl); + await keyboard.Add(ButilKeyCodes.KeyF, () => _ = searchBox.FocusAsync(), ButilModifiers.Ctrl); } }"; }