Skip to content

Commit eeb748e

Browse files
authored
Compability to Mud Core 6.2.1 (#178)
1 parent ddbe1d3 commit eeb748e

10 files changed

Lines changed: 18 additions & 24 deletions

File tree

CodeBeam.MudBlazor.Extensions/Base/MudBaseInputExtended.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,14 +292,14 @@ protected virtual Task UpdateTextPropertyAsync(bool updateValue)
292292

293293
protected bool _isFocused;
294294

295-
protected internal virtual void OnBlurred(FocusEventArgs obj)
295+
protected internal virtual async Task OnBlurredAsync(FocusEventArgs obj)
296296
{
297297
_isFocused = false;
298298

299299
if (!OnlyValidateIfDirty || _isDirty)
300300
{
301301
Touched = true;
302-
BeginValidateAfter(OnBlur.InvokeAsync(obj));
302+
await BeginValidationAfterAsync(OnBlur.InvokeAsync(obj));
303303
}
304304
}
305305

@@ -383,7 +383,7 @@ protected virtual async Task SetValueAsync(T value, bool updateText = true, bool
383383
if (updateText)
384384
await UpdateTextPropertyAsync(false);
385385
await ValueChanged.InvokeAsync(Value);
386-
BeginValidate();
386+
await BeginValidateAsync();
387387
FieldChanged(Value);
388388
}
389389
}
@@ -457,10 +457,10 @@ protected override async Task OnInitializedAsync()
457457
Label = For.GetLabelString();
458458
}
459459

460-
public virtual void ForceRender(bool forceTextUpdate)
460+
public virtual async Task ForceRender(bool forceTextUpdate)
461461
{
462462
_forceTextUpdate = true;
463-
UpdateTextPropertyAsync(false).AndForget();
463+
await UpdateTextPropertyAsync(false);
464464
StateHasChanged();
465465
}
466466

CodeBeam.MudBlazor.Extensions/CodeBeam.MudBlazor.Extensions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<ItemGroup>
2525
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
2626
<PackageReference Include="CsvHelper" Version="30.0.1" />
27-
<PackageReference Include="MudBlazor" Version="6.1.9" />
27+
<PackageReference Include="MudBlazor" Version="6.2.1" />
2828
<PackageReference Include="SkiaSharp.Views.Blazor" Version="2.88.3" />
2929
<PackageReference Include="ZXing.Net" Version="0.16.9" />
3030
<PackageReference Include="ZXing.Net.Bindings.SkiaSharp" Version="0.16.13" />

CodeBeam.MudBlazor.Extensions/Components/InputExtended/MudInputExtended.razor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
inputmode="@InputMode.ToString()"
2626
@oninput="OnInputHandler"
2727
@onchange="OnChangeHandler"
28-
@onblur="@OnBlurred"
28+
@onblur="@OnBlurredAsync"
2929
@onkeydown="@InvokeKeyDown"
3030
@onkeypress="@InvokeKeyPress"
3131
@onkeyup="@InvokeKeyUp"
@@ -61,7 +61,7 @@
6161
placeholder="@Placeholder"
6262
disabled=@Disabled
6363
readonly="@ReadOnly"
64-
@onblur="@OnBlurred"
64+
@onblur="@OnBlurredAsync"
6565
inputmode="@InputMode.ToString()"
6666
pattern="@Pattern"
6767
@onkeydown="@InvokeKeyDown"
@@ -84,7 +84,7 @@
8484
*@
8585
<div class="@InputClassname"
8686
style="@($"display:{(InputType == InputType.Hidden && ChildContent != null ? "inline" : "none")}; {MockInputStyle}")"
87-
@onblur="@OnBlurred" @ref="@_elementReference1">
87+
@onblur="@OnBlurredAsync" @ref="@_elementReference1">
8888
@ChildContent
8989
</div>
9090
}
@@ -94,7 +94,7 @@
9494
<div class="@InputClassname"
9595
style="@($"display:{(InputType == InputType.Hidden && ChildContent != null ? "inline" : "none")}; {MockInputStyle}")"
9696
tabindex="@(InputType == InputType.Hidden && ChildContent != null ? 0 : -1)"
97-
@onblur="@OnBlurred" @ref="@_elementReference1">
97+
@onblur="@OnBlurredAsync" @ref="@_elementReference1">
9898
@ChildContent
9999
</div>
100100
}

CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
ForId="@FieldId">
2020
<InputContent>
2121
<CascadingValue Name="Standalone" Value="false" IsFixed="true">
22-
<MudInput T="string"
22+
<MudInputExtended T="string"
2323
@ref="InputReference"
2424
@attributes="UserAttributes"
2525
InputType="@_passwordInput"
@@ -44,7 +44,7 @@
4444
ErrorId="@ErrorId"
4545
Immediate="@Immediate"
4646
Margin="@Margin"
47-
OnBlur="@OnBlurred"
47+
OnBlur="@OnBlurredAsync"
4848
OnKeyDown="@InvokeKeyDown"
4949
OnInternalInputChanged="OnChange"
5050
OnKeyPress="@InvokeKeyPress"

CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public partial class MudPasswordField<T> : MudDebouncedInput<T>
1515
.AddClass(Class)
1616
.Build();
1717

18-
public MudInput<string> InputReference { get; private set; }
18+
public MudInputExtended<string> InputReference { get; private set; }
1919
InputType _passwordInput = InputType.Password;
2020
string _passwordIcon = Icons.Material.Filled.VisibilityOff;
2121
bool _passwordMode = true;

CodeBeam.MudBlazor.Extensions/Components/SelectExtended/MudSelectExtended.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ protected internal async void HandleKeyUp(KeyboardEventArgs obj)
821821
await OnKeyUp.InvokeAsync(obj);
822822
}
823823

824-
internal void OnLostFocus(FocusEventArgs obj)
824+
protected internal async Task OnLostFocus(FocusEventArgs obj)
825825
{
826826
//if (_isOpen)
827827
//{
@@ -831,7 +831,7 @@ internal void OnLostFocus(FocusEventArgs obj)
831831
//}
832832
//base.OnBlur.InvokeAsync(obj).AndForget();
833833

834-
OnBlurred(obj);
834+
await OnBlurredAsync(obj);
835835
}
836836

837837
public override ValueTask FocusAsync()

CodeBeam.MudBlazor.Extensions/Components/TextFieldExtended/MudTextFieldExtended.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
ErrorId="@ErrorId"
4242
Immediate="@Immediate"
4343
Margin="@Margin"
44-
OnBlur="@OnBlurred"
44+
OnBlur="@OnBlurredAsync"
4545
OnKeyDown="@InvokeKeyDown"
4646
OnInternalInputChanged="OnChange"
4747
OnKeyPress="@InvokeKeyPress"
@@ -83,7 +83,7 @@
8383
IconSize="@IconSize"
8484
Error="@Error"
8585
Immediate="@Immediate"
86-
Margin="@Margin" OnBlur="@OnBlurred"
86+
Margin="@Margin" OnBlur="@OnBlurredAsync"
8787
Clearable="@Clearable"
8888
OnClearButtonClick="@OnClearButtonClick"
8989
AdornmentStart="@AdornmentStart"

ComponentViewer.Docs/ComponentViewer.Docs.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<ItemGroup>
1515
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.1" />
16-
<PackageReference Include="MudBlazor" Version="6.1.9" />
16+
<PackageReference Include="MudBlazor" Version="6.2.1" />
1717
<PackageReference Include="SkiaSharp.Views.Blazor" Version="2.88.3" />
1818
</ItemGroup>
1919

ComponentViewer.Wasm/ComponentViewer.Wasm.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
<ItemGroup>
1010
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.1" />
1111
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.1" PrivateAssets="all" />
12-
<PackageReference Include="MudBlazor" Version="6.1.9" />
13-
<PackageReference Include="SkiaSharp.Views.Blazor" Version="2.88.3" />
1412
</ItemGroup>
1513

1614
<ItemGroup>

ComponentViewer/ComponentViewer.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

9-
<ItemGroup>
10-
<PackageReference Include="MudBlazor" Version="6.1.9" />
11-
</ItemGroup>
12-
139
<ItemGroup>
1410
<ProjectReference Include="..\CodeBeam.MudBlazor.Extensions\CodeBeam.MudBlazor.Extensions.csproj" />
1511
<ProjectReference Include="..\ComponentViewer.Docs\ComponentViewer.Docs.csproj" />

0 commit comments

Comments
 (0)