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

Trigger save from outside form #32

Closed
jasonlaw opened this issue Mar 19, 2019 · 2 comments
Closed

Trigger save from outside form #32

jasonlaw opened this issue Mar 19, 2019 · 2 comments

Comments

@jasonlaw
Copy link

Is it possible to trigger the save action from outside of the form? I would like to place a save button/icon on the App bar, but I am not sure how to trigger the form save.

Thanks in advance.

@danvick
Copy link
Collaborator

danvick commented Mar 20, 2019

Hi @jasonlaw,
I think the easiest option is to allow passing in the GlobalKey<FormState> so that one has the handle to the form itself then do away with the submit and reset buttons.

This will make it easier for the developer to have control over submitting/resetting and putting a loader.

What do you think?

@jasonlaw
Copy link
Author

I think that is a great idea, thank you very much!

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

2 participants