Skip to content

React Form Hook with UI5 Web Components React #1865

Closed Answered by MarcusNotheis
apoorvsemwal asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @apoorvsemwal,

thanks for reaching out!

After having a quick look I would assume that you need to update react-from-hook:
It looks like the version you are using (6.15.2) always expects the event to be some kind of the React SyntheticBaseEvent because it would always call event.persist() which only exists in these kind of events. As the UI5 Web Components (for React) are using "regular" events for e.g. our Button, this code will crash because persist is not a function in the event object.

Newer versions (>= 7.2.0) are supporting other event types as well (see react-hook-form/react-hook-form#4825), so I would assume that upgrading react-form-hook will solve your issue.

Best regards,
Ma…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@apoorvsemwal
Comment options

Answer selected by MarcusNotheis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants