Ionic Components Dont Respond to onChange on onBlur For Validation
See original GitHub issuePlease consider asking the question at our spectrum channel.
Describe the question? I am just confirming that the only way to get Ionic Components to properly validate onChange or onBlur is to trigger it directly based on the event or to wrap it in a control.
To Reproduce
See Link to sample project, if I remove the event listener from the component it fails, the getInputElement() only work on IonInput and there are more complex components like IonRadioButtonGroup that also dont provide access to the proper element.
I am fine if this is the appropriate solution, I just dont want to post a blog with a hack if there is a better way
Codesandbox link https://codesandbox.io/s/react-hook-form-ionic-input-components-29zur
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)

Top Related StackOverflow Question
It appears @aaronksaunders has updated his example for v7 at https://stackblitz.com/edit/ionic-react-hook-form-me1pv4?file=src%2FApp.tsx. Thanks!
i switched everything over to the controller and it works fine, thanks https://codesandbox.io/s/react-hook-form-ionic-input-components-29zur