onSubmit without submit input not working
I can't handle native submit with onSubmit ( https://www.youtube.com/watch?v=U2a3V2XcIcY&feature=youtu.be )
React v0.12.0
It's not very easy to follow what's actually going on there, would it be possible to create a repro?
Going to close this out but if you can make a minimal repro case, please post it here and I'll reopen.
<form ref="form" onSubmit={(e)=>{
// this event not fired if submit form on click button if button not in form
}}></form>
<button onClick={e=>{ReactDOM.findDOMNode(this.refs.form).submit()}}>Submit form</button>
how do it?
@bORm Ideally, browsers do not fire the onsubmit event when the form's submit() method is called (http://jsbin.com/coluxo/1/edit?html,js,console,output). You can move the onsubmit handler to a method in the component & call it.
@selvagsz any idea how submit form from outside & fire onsubmit event?