mjangir / formik-wizard-form

Build multi step forms using Formik with ease.
http://formikwizard.manishjangir.com
MIT License
74 stars 18 forks source link

Passing props to Form component #2

Open neverhood671 opened 5 years ago

neverhood671 commented 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() } }}>

mjangir commented 5 years ago

PR is welcome