Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example needed: Form Create inside Modal #24

Open
gmp26 opened this issue Aug 28, 2018 · 2 comments
Open

Example needed: Form Create inside Modal #24

gmp26 opened this issue Aug 28, 2018 · 2 comments

Comments

@gmp26
Copy link

gmp26 commented Aug 28, 2018

I'm finding it tricky to understand what is necessary to duplicate https://ant.design/components/form/#components-form-demo-form-in-modal using Antizer's create-form approach.

The tricky part is to find a way to bind the modal OK and Cancel click events so they behave as form buttons and trigger validation correctly. The Ant example accomplishes this using form.refs after using Form.Create to create a modal wrapping a form. It's not clear that Antizer's create-form can handle this wrapped form creation. It's documentation says that form.create 'Calls Form.create() decorator with the form to be created. form can be any hiccup form.'.

I'd love there to be a Form inside Modal example :)

I'm using Rum.

@gmp26
Copy link
Author

gmp26 commented Aug 28, 2018

Just noticed that the Rum documentation for create-form is different and allows the creation of any rum/defcs component - which could include a modal wrapped form. Assuming that's ok in rum, the remaining issue is the use of form.refs.

@gmp26
Copy link
Author

gmp26 commented Aug 30, 2018

I had no success with a modal wrapped form - create-form did not cope - so have resorted to hiding the buttons supplied by ant/modal and using the form buttons direct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant