|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
using Connected.Models;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
|
|
|
|
|
namespace Connected.Components;
|
|
|
|
|
public partial class InputText: InputBase
|
|
|
|
@ -34,16 +35,20 @@ public partial class InputText: InputBase
|
|
|
|
|
|
|
|
|
|
private async Task ChangeValueAsync(ChangeEventArgs args)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(args.Value.ToString())) ErrorText = string.Empty;
|
|
|
|
|
await ValueChanged.InvokeAsync(args.Value.ToString());
|
|
|
|
|
StateHasChanged();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task Clear()
|
|
|
|
|
{
|
|
|
|
|
await ValueChanged.InvokeAsync(string.Empty);
|
|
|
|
|
ChangeEventArgs arg = new ChangeEventArgs();
|
|
|
|
|
arg.Value = string.Empty;
|
|
|
|
|
await ChangeValueAsync(arg);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
|
protected override async Task OnParametersSetAsync()
|
|
|
|
|
{
|
|
|
|
|
if (base.InputAttributes is null) base.InputAttributes = new();
|
|
|
|
|
if (base.Required)
|
|
|
|
|