Open neverhood671 opened 5 years ago
I think it would be usefull to add ability to passing props to Form component.
For example I need to prevent form submitting on enter, so I want to add onKeyDown handler on Form
<Form onKeyDown={ e => { if ((e.key === 'Enter') && (e.target.tagName !== 'BUTTON' || e.target.type !== 'submit')) { e.preventDefault() } }}>
PR is welcome
I think it would be usefull to add ability to passing props to Form component.
For example I need to prevent form submitting on enter, so I want to add onKeyDown handler on Form
<Form onKeyDown={ e => { if ((e.key === 'Enter') && (e.target.tagName !== 'BUTTON' || e.target.type !== 'submit')) { e.preventDefault() } }}>