New to KendoReact? Start a free 30-day trial
Clear NumericTextBox value on pressing ESC key
Updated on Dec 19, 2025
Environment
| Product Version | 5.13.1 |
| Product | Progress® KendoReact NumericTextBox |
Description
I want to add custom logic to the NumericTextBox for clearing the value when the ESC key is pressed.
Solution
Within React.useEffect, after the initialization of the component, add event listener to the input element of the NumericTextBox and set the value to "null" if the keyCode is "27".
Following is an example demonstrating this approach:
Change Theme
Theme
Loading ...