Please add an AllowClear property on the Radzen TextBox similar to Radzen Dropdown.
Hi @anthonyyott,
The DropDown needs this to delete the selected value while in regular TextBox you can select and delete everything.
Hello, you can create your own component:
CustomTextBox.razor
<div class="position-relative">
<RadzenTextBox Value="@Value" ValueChanged="@ValueChanged" Change="@Change"/>
<span @onclick="clear" class="clearable"><span class="fa-solid fa-xmark"></span></span>
</div>
@code {
[Parameter]
public string Value { get; set; }
[Parameter]
public EventCallback<string> ValueChanged { get; set; }
[Parameter]
public EventCallback<string> Change { get; set; }
void clear()
{
ValueChanged.InvokeAsync(null);
Change.InvokeAsync(null);
}
}
CustomTextBox.razor.css
.clearable
{
position:absolute;
right:10px;
top:10px;
color:#bbb;
}