This is a migrated thread and some comments may be shown as answers.

How to add focus event on NumericTextBox.

1 Answer 417 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sanjay
Top achievements
Rank 1
sanjay asked on 18 Mar 2019, 12:38 PM

Hi,

I want to add focus event on NumericTextBox.Can you please suggest how to add focus event to NumericTextBox as i have to trigger some event based on focus.

please find the below implementation  i need to achieve:-

 

<NumericTextBox type="text" name={name} className={cssClass} onChange={(ev) => this.onChange(ev) onFocus = {this.onFocusNumericGroupInput} />

 

onFocusNumericGroupInput = () => {
console.log("focus event fired")
}

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 19 Mar 2019, 09:13 AM
Hello,

Add the focus on the outside element. Since the event bubbles and is synthetic it will work the same way. 

<div onFocus = {this.onFocusNumericGroupInput} >
<NumericTextBox type="text" name={name} className={cssClass} onChange={(ev) => this.onChange(ev) />
</div>
 
  
 
onFocusNumericGroupInput = () => {
console.log("focus event fired")
}


Regards,
Vasil
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
sanjay
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or