Binding oninput event

Hi!

I'd like to use the following with a radzen (blazor) textarea, but it doesn't work.

What works, but not radzen:

<textarea @bind-value="@MyValue" @bind-value:event="oninput" onchange="(eventArgs) => { MyValue = (string)eventArgs; }" />

how I tried:
<RadzenTextArea @bind-value="@MyValue" Change="(eventArgs) => { MyValue = (string)eventArgs; }" @bind-value:event="oninput" />

If I want to use it with RadzenTextArea I get the following:
Object of type 'Radzen.Blazor.RadzenTextArea' does not have a property matching the name 'oninput'

How can I make it work with RadzenTextArea?

Hi @kaamos91,

Currently there is not way for such binding with RadzenTextArea - we will do our best to provide it soon.

Hi @kaamos91,

I've just published new version of Radzen.Blazor and now you can define arbitrary attributes for all Radzen components.

For example:

<RadzenTextBox @oninput="@(args => OnInput(args.Value.ToString()))" />

void OnInput(string value)
{
      //
}

https://blazor.radzen.com/textbox

1 Like