When the user types in a character or copies and pastes into text box the valuechanged event on that first character is null, Why?
Any way around this? What am I doing wrong on it.
Type 1 character in first box and nothing happens. Type more and the typed character appears in second, one off what should be there.
ANd same happens if you paste a value in.
Code example:
<h1>Hello, Telerik REPL for Blazor!</h1>
<div style="border: 1px gray solid;">
<span @onkeypress="@onSearchValueChange" @onkeydown="@onSearchValueChange">
<TelerikTextBox @bind-Value="@stringValue" @ref="@txtBxRefSearchValue" Id="SearchValue" />
</span>
<TelerikTextBox @bind-Value="@stringValue2" @ref="@txtBxRefSearchValue2" Id="SearchValue2" />
</div>
@code {
string stringValue { get; set; }
TelerikTextBox txtBxRefSearchValue { get; set; }
string stringValue2 { get; set; }
TelerikTextBox txtBxRefSearchValue2 { get; set; }
public void onSearchValueChange( KeyboardEventArgs e)
{
// Note! it has no value on the first character, NULL, but once 2nd one typed in tis good to go.
if (txtBxRefSearchValue.Value is not null)
{
if (txtBxRefSearchValue.Value.Length > 0)
{
stringValue2 = "Work on value";
}
else
{
stringValue2 = "Do nothing";
};
};
}
}