Javier1
February 17, 2023, 12:55pm
1
Good morning.
I'm trying to make the data binding happen when an input is executed and not when the field loses focus.
It sounds like I've seen it in the documentation but I'm not able to find it.
It must be something like that
bind-value:event="oninput" , but obviously I'm not doing something right.
Could you help me .
korchev
February 17, 2023, 1:27pm
2
Hi @Javier1 ,
The RadzenTextBox does not support this behavior out of the box and bind-value:event="oninput"
works only for <input>
elements AFAIK. You can try handling the DOM input event yourself:
<RadzenTextBox @oninput=@OnInput Value="@property" />
@code {
string property = "";
void OnInput(Microsoft.AspNetCore.Components.ChangeEventArgs args)
{
property = args.Value;
}
}
Javier1
February 17, 2023, 2:44pm
3
No wonder I couldn't find it in the documentation, God knows where I read it.
Thank you for investing your time in responding.
Thank you