|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
using Connected.Models;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
|
|
|
|
|
namespace Connected.Components;
|
|
|
|
|
public partial class InputText: InputBase
|
|
|
|
@ -6,7 +7,7 @@ public partial class InputText: InputBase
|
|
|
|
|
[Parameter]
|
|
|
|
|
public int NumOfRows
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return _numberOfLines;
|
|
|
|
|
}
|
|
|
|
@ -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();
|
|
|
|
|
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)
|
|
|
|
|