From 6ce196e401b2cac57dedabb9d875a2b5b651a996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Can=20Karag=C3=B6z?= Date: Mon, 23 Feb 2026 14:10:21 +0300 Subject: [PATCH] MudPasswordField: Form Improvements --- .../PasswordField/MudPasswordField.razor | 10 ++++++---- .../PasswordField/MudPasswordField.razor.cs | 18 ------------------ 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/src/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor b/src/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor index 9bd8901f..47836542 100644 --- a/src/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor +++ b/src/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor @@ -2,9 +2,10 @@ @typeparam T @inherits MudDebouncedInput - + + ForId="@InputElementId"> - + InputReference { get; private set; } = null!; private InputType GetPasswordInputType() => _passwordMode.Value ? InputType.Password : InputType.Text; private string? GetPasswordIcon() => _passwordMode.Value ? Icons.Material.Filled.Visibility : Icons.Material.Filled.VisibilityOff; - //InputType _passwordInput = InputType.Password; - //string? _passwordIcon = Icons.Material.Filled.VisibilityOff; - - [CascadingParameter(Name = "Standalone")] - internal bool StandaloneEx { get; set; } = true; - - /// - /// Type of the input element. It should be a valid HTML5 input type. - /// - [Parameter] - [Category(CategoryTypes.FormComponent.Behavior)] - public InputType InputType { get; set; } = InputType.Text; - private string GetCounterText() => Counter == null ? string.Empty : (Counter == 0 ? (string.IsNullOrEmpty(ReadText) ? "0" : $"{ReadText.Length}") : ((string.IsNullOrEmpty(ReadText) ? "0" : $"{ReadText.Length}") + $" / {Counter}")); /// @@ -158,11 +145,6 @@ public async Task SetText(string text) await InputReference.SetText(text); } - private async Task OnMaskedValueChanged(string s) - { - await SetTextCoreAsync(s); - } - /// /// If true, masks text with password mode. ///