Open briannezhad opened 2 years ago
Hi
<PhoneInput textProps={{ onFocus: () => this.focus(), onBlur: () => this.blur() }} />
I am trying it this way: textProps={{ onFocus: () => phoneRef.current?.focus() }}
Shouldn't that work? Well, it doesn't, but this does: ref={(ref) => { ref?.focus(); }}
I need to set a function when is on blur or focus. But it doesn't work when I do as follow:
be mindful that this is a child component.
I wish I could access it through the component attribute. for example, like such:
UPDATE:
What I really want, it onFocus to do an action.