Hi,
snippet
<div>
<SfTextBox @ref="textboxObj"
CssClass="text-custom"
@onkeypress='@(e => KeyPressed(e))'
Created="onCreated"
@bind-Value="ValueString" />
</div>
public async void KeyPressed(KeyboardEventArgs args)
{
if (args.Key == "Enter")
{
await GetEmployeeData();
ValueString = "";
}
else
{
ValueString += args.Key;
}
StateHasChanged();
}
The KeyPressed doesn't capture the backspace key.
Is it possible?
Best regards,
Thijs van Rijswijk