I'm trying to focus on DynamicNumber, but it throws error as cannot read focus of null. I'm targeting from onChange of another component. Simple example of what I have done:
xyz = () => {
this.abc.focus();
}
<DynamicNumber
ref={(input) => { this.abc = input; }}
/>
I'm trying to focus on DynamicNumber, but it throws error as cannot read focus of null. I'm targeting from onChange of another component. Simple example of what I have done:
xyz = () => {
this.abc.focus();
}
<DynamicNumber
ref={(input) => { this.abc = input; }}
/>