Skip to content

Commit

Permalink
v7.1.0 Cleanup (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
mckaragoz authored Nov 18, 2024
1 parent 9e49ee1 commit f65ab98
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="~/" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<link href="app.css" rel="stylesheet" />
<link href="ComponentViewer.styles.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@700;900&display=swap" rel="stylesheet">
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.*" />
<PackageReference Include="MudBlazor" Version="7.12.1" />
<PackageReference Include="MudBlazor" Version="7.15.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<ItemGroup>
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
<PackageReference Include="CsvHelper" Version="31.0.3" />
<PackageReference Include="MudBlazor" Version="7.12.1" />
<PackageReference Include="MudBlazor" Version="7.15.0" />
<PackageReference Include="ZXing.Net" Version="0.16.9" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace MudExtensions
/// Component that has select and autocomplete features.
/// </summary>
/// <typeparam name="T"></typeparam>
public partial class MudComboBox<T> : MudBaseInputExtended<T?>
public partial class MudComboBox<T> : MudBaseInputExtended<T>
{
#region Constructor, Injected Services, Parameters, Fields

Expand All @@ -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 =
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -888,7 +887,7 @@ protected override void Dispose(bool disposing)
/// Protected keydown event.
/// </summary>
/// <param name="obj"></param>
protected internal void HandleKeyDown(KeyboardEventArgs obj)
protected internal async Task HandleKeyDown(KeyboardEventArgs obj)
{
if (Disabled || ReadOnly)
return;
Expand Down Expand Up @@ -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":
Expand All @@ -1027,7 +1026,7 @@ protected internal async Task SearchBoxHandleKeyDown(KeyboardEventArgs obj)
/// Protected searchbox keyup event.
/// </summary>
/// <param name="obj"></param>
protected internal void SearchBoxHandleKeyUp(KeyboardEventArgs obj)
protected internal async Task SearchBoxHandleKeyUp(KeyboardEventArgs obj)
{
ForceRenderItems();
}
Expand All @@ -1036,7 +1035,7 @@ protected internal void SearchBoxHandleKeyUp(KeyboardEventArgs obj)
/// Protected keyup event.
/// </summary>
/// <param name="obj"></param>
protected internal async void HandleKeyUp(KeyboardEventArgs obj)
protected internal async Task HandleKeyUp(KeyboardEventArgs obj)
{
ForceRenderItems();
await OnKeyUp.InvokeAsync(obj);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace MudExtensions
/// Select component with advanced features.
/// </summary>
/// <typeparam name="T"></typeparam>
public partial class MudSelectExtended<T> : MudBaseInputExtended<T?>, IMudSelectExtended, IMudShadowSelectExtended
public partial class MudSelectExtended<T> : MudBaseInputExtended<T>, IMudSelectExtended, IMudShadowSelectExtended
{

#region Constructor, Injected Services, Parameters, Fields
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -838,7 +837,7 @@ protected override void Dispose(bool disposing)
/// Keydown event.
/// </summary>
/// <param name="obj"></param>
protected internal async void HandleKeyDown(KeyboardEventArgs obj)
protected internal async Task HandleKeyDown(KeyboardEventArgs obj)
{
if (Disabled || ReadOnly)
return;
Expand Down Expand Up @@ -915,7 +914,7 @@ protected internal async void HandleKeyDown(KeyboardEventArgs obj)
/// Keyup event.
/// </summary>
/// <param name="obj"></param>
protected internal async void HandleKeyUp(KeyboardEventArgs obj)
protected internal async Task HandleKeyUp(KeyboardEventArgs obj)
{
await OnKeyUp.InvokeAsync(obj);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,29 +112,29 @@ public partial class MudSwitchM3<T> : MudBooleanInput<T>
/// Keydown event.
/// </summary>
/// <param name="obj"></param>
protected internal void HandleKeyDown(KeyboardEventArgs obj)
protected internal async Task HandleKeyDown(KeyboardEventArgs obj)
{
if (Disabled || ReadOnly)
return;
switch (obj.Key)
{
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;
}
Expand Down

0 comments on commit f65ab98

Please sign in to comment.