You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was having a hard time figuring out why my ancestor form's onSubmit was triggering.
I tried e.stopPropagation but that didn't work, after a lot of debugging I found that props.onSubmit is called inside a setState callback, this is causing ancestor onSubmit to trigger before the actual RJSF's onSubmit.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was having a hard time figuring out why my ancestor form's onSubmit was triggering.
I tried
e.stopPropagation
but that didn't work, after a lot of debugging I found thatprops.onSubmit
is called inside asetState
callback, this is causing ancestoronSubmit
to trigger before the actual RJSF's onSubmit.This code here
I created a sandbox to reproduce this
Anyone has any ideas how do i stop the event propagation?
Beta Was this translation helpful? Give feedback.
All reactions