diff --git a/CodeBeam.MudBlazor.Extensions.Docs.Server/Pages/_Layout.cshtml b/CodeBeam.MudBlazor.Extensions.Docs.Server/Pages/_Layout.cshtml
index 7927677f..d2e26414 100644
--- a/CodeBeam.MudBlazor.Extensions.Docs.Server/Pages/_Layout.cshtml
+++ b/CodeBeam.MudBlazor.Extensions.Docs.Server/Pages/_Layout.cshtml
@@ -8,9 +8,7 @@
-
-
diff --git a/CodeBeam.MudBlazor.Extensions.Docs/CodeBeam.MudBlazor.Extensions.Docs.csproj b/CodeBeam.MudBlazor.Extensions.Docs/CodeBeam.MudBlazor.Extensions.Docs.csproj
index 6ccc66bb..3c0dfd5e 100644
--- a/CodeBeam.MudBlazor.Extensions.Docs/CodeBeam.MudBlazor.Extensions.Docs.csproj
+++ b/CodeBeam.MudBlazor.Extensions.Docs/CodeBeam.MudBlazor.Extensions.Docs.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj b/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj
index 208f034a..8077fb5a 100644
--- a/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj
+++ b/CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj
@@ -32,7 +32,7 @@
-
+
diff --git a/CodeBeam.MudBlazor.Extensions/Components/ComboBox/MudComboBox.razor.cs b/CodeBeam.MudBlazor.Extensions/Components/ComboBox/MudComboBox.razor.cs
index a75553d3..72b0cdd9 100644
--- a/CodeBeam.MudBlazor.Extensions/Components/ComboBox/MudComboBox.razor.cs
+++ b/CodeBeam.MudBlazor.Extensions/Components/ComboBox/MudComboBox.razor.cs
@@ -11,7 +11,7 @@ namespace MudExtensions
/// Component that has select and autocomplete features.
///
///
- public partial class MudComboBox : MudBaseInputExtended
+ public partial class MudComboBox : MudBaseInputExtended
{
#region Constructor, Injected Services, Parameters, Fields
@@ -38,7 +38,7 @@ protected internal void SetSearchString(T value)
private readonly string? multiSelectionText;
static readonly KeyInterceptorOptions _keyInterceptorOptions = new()
{
- EnableLogging = true,
+ //EnableLogging = true,
TargetClass = "mud-input-control",
Keys =
{
@@ -849,7 +849,6 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
if (firstRender)
{
- // TODO: Use Task for HandleKeyDown / HandleKeyDown
await KeyInterceptorService.SubscribeAsync(_elementId, _keyInterceptorOptions, keyDown: HandleKeyDown, keyUp: HandleKeyUp);
await UpdateDataVisualiserTextAsync();
_firstRendered = true;
@@ -888,7 +887,7 @@ protected override void Dispose(bool disposing)
/// Protected keydown event.
///
///
- protected internal void HandleKeyDown(KeyboardEventArgs obj)
+ protected internal async Task HandleKeyDown(KeyboardEventArgs obj)
{
if (Disabled || ReadOnly)
return;
@@ -1011,7 +1010,7 @@ protected internal async Task SearchBoxHandleKeyDown(KeyboardEventArgs obj)
case "ArrowDown":
case "Enter":
case "NumpadEnter":
- HandleKeyDown(obj);
+ await HandleKeyDown(obj);
return;
case "Tab":
@@ -1027,7 +1026,7 @@ protected internal async Task SearchBoxHandleKeyDown(KeyboardEventArgs obj)
/// Protected searchbox keyup event.
///
///
- protected internal void SearchBoxHandleKeyUp(KeyboardEventArgs obj)
+ protected internal async Task SearchBoxHandleKeyUp(KeyboardEventArgs obj)
{
ForceRenderItems();
}
@@ -1036,7 +1035,7 @@ protected internal void SearchBoxHandleKeyUp(KeyboardEventArgs obj)
/// Protected keyup event.
///
///
- protected internal async void HandleKeyUp(KeyboardEventArgs obj)
+ protected internal async Task HandleKeyUp(KeyboardEventArgs obj)
{
ForceRenderItems();
await OnKeyUp.InvokeAsync(obj);
diff --git a/CodeBeam.MudBlazor.Extensions/Components/SelectExtended/MudSelectExtended.razor.cs b/CodeBeam.MudBlazor.Extensions/Components/SelectExtended/MudSelectExtended.razor.cs
index 4c9d66b4..b026f46e 100644
--- a/CodeBeam.MudBlazor.Extensions/Components/SelectExtended/MudSelectExtended.razor.cs
+++ b/CodeBeam.MudBlazor.Extensions/Components/SelectExtended/MudSelectExtended.razor.cs
@@ -11,7 +11,7 @@ namespace MudExtensions
/// Select component with advanced features.
///
///
- public partial class MudSelectExtended : MudBaseInputExtended, IMudSelectExtended, IMudShadowSelectExtended
+ public partial class MudSelectExtended : MudBaseInputExtended, IMudSelectExtended, IMudShadowSelectExtended
{
#region Constructor, Injected Services, Parameters, Fields
@@ -775,7 +775,6 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
if (firstRender)
{
- // TODO: Make HandleKeyDown / HandleKeyUp async Task
await KeyInterceptorService.SubscribeAsync(_elementId, new KeyInterceptorOptions()
{
//EnableLogging = true,
@@ -838,7 +837,7 @@ protected override void Dispose(bool disposing)
/// Keydown event.
///
///
- protected internal async void HandleKeyDown(KeyboardEventArgs obj)
+ protected internal async Task HandleKeyDown(KeyboardEventArgs obj)
{
if (Disabled || ReadOnly)
return;
@@ -915,7 +914,7 @@ protected internal async void HandleKeyDown(KeyboardEventArgs obj)
/// Keyup event.
///
///
- protected internal async void HandleKeyUp(KeyboardEventArgs obj)
+ protected internal async Task HandleKeyUp(KeyboardEventArgs obj)
{
await OnKeyUp.InvokeAsync(obj);
}
diff --git a/CodeBeam.MudBlazor.Extensions/Components/SwitchM3/MudSwitchM3.razor.cs b/CodeBeam.MudBlazor.Extensions/Components/SwitchM3/MudSwitchM3.razor.cs
index bfb32612..31a70942 100644
--- a/CodeBeam.MudBlazor.Extensions/Components/SwitchM3/MudSwitchM3.razor.cs
+++ b/CodeBeam.MudBlazor.Extensions/Components/SwitchM3/MudSwitchM3.razor.cs
@@ -112,7 +112,7 @@ public partial class MudSwitchM3 : MudBooleanInput
/// Keydown event.
///
///
- protected internal void HandleKeyDown(KeyboardEventArgs obj)
+ protected internal async Task HandleKeyDown(KeyboardEventArgs obj)
{
if (Disabled || ReadOnly)
return;
@@ -120,21 +120,21 @@ protected internal void HandleKeyDown(KeyboardEventArgs obj)
{
case "ArrowLeft":
case "Delete":
- SetBoolValueAsync(false);
+ await SetBoolValueAsync(false);
break;
case "ArrowRight":
case "Enter":
case "NumpadEnter":
- SetBoolValueAsync(true);
+ await SetBoolValueAsync(true);
break;
case " ":
if (BoolValue == true)
{
- SetBoolValueAsync(false);
+ await SetBoolValueAsync(false);
}
else
{
- SetBoolValueAsync(true);
+ await SetBoolValueAsync(true);
}
break;
}