ChangeValue event without loose focus

With textbox i can use events like OnChange or OnChangeValue, but this are triggered only when the component loose the focus,
i can intercept this with OnKeyUp/OnKeyDown but i can't read the correct value of the texbox inside the event, also i need to update the state of 1 button when the value is not empty insid the event,
if i try to use StateHasChanged() the button is not updated
How to make this?

1 Reply

PO Prince Oliver Syncfusion Team February 17, 2020 02:26 PM UTC

Hi Ricardo, 

Thank you for contacting us. 

You can use the Input event in the EjsTextBox and get the typed values in the event handler argument. Kindly refer to the following code. 

<EjsTextBox ID="tex" Input="@TextBoxInput"></EjsTextBox> 
 
<button >Input value = @inp</button> 
 
@code { 
 
    public string inp { get; set; } 
 
    public void TextBoxInput(InputEventArgs args) 
    { 
        this.inp = args.Value; 
    } 
} 

Based on the obtained input value you can set the button state or value as per your requirement. 

  
Kindly check the above solution and let us know if you need any further assistance on this. 

Regards, 
Prince 


Loader.
Up arrow icon