ElemeFE / element-react

Element UI
https://elemefe.github.io/element-react/index
MIT License
2.83k stars 443 forks source link

Button "form" field not working #1025

Open rip32700 opened 4 years ago

rip32700 commented 4 years ago

Description

Having a submit button outside of a form tag isn't working. Normally you can put an ID for a form and then have a submit button using that ID in his "form" attribute.

Reproduce Steps

  1. Create a component having a form and setting an id for the form like <Form id="myForm"> ... </Form>

  2. Put a button outside of the form using the form field like <Button nativeType="submit" form="myForm>Submit</Button>