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

Imperative submit #136

Merged
merged 3 commits into from
Jan 4, 2023
Merged

Imperative submit #136

merged 3 commits into from
Jan 4, 2023

Conversation

gustavoguichard
Copy link
Contributor

@gustavoguichard gustavoguichard commented Jan 3, 2023

This has been a requested feature lately. It allows for calling the form submit as a side effect of another action.
There are a few use cases described in #17 .

I added an example and tests based on a recent project where I felt the need for this feature.

The solution was inspired by @paulm17 's workaround.

@netlify
Copy link

netlify bot commented Jan 3, 2023

Deploy Preview for remix-forms ready!

Name Link
🔨 Latest commit 690d85a
🔍 Latest deploy log https://app.netlify.com/sites/remix-forms/deploys/63b5c94aa6b99f0009c1e17e
😎 Deploy Preview https://deploy-preview-136--remix-forms.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@diogob diogob force-pushed the imperative-submit branch from fc8493b to 690d85a Compare January 4, 2023 18:45
@diogob diogob added breaking and removed breaking labels Jan 4, 2023
Copy link
Contributor

@diogob diogob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have initially suspected we would havbe a breaking change due to the new type definition for FormComponent. But upon inspection it turns out the React.RefAttributes<HTMLFormElement> adds only an optional ref.

@diogob diogob merged commit 9d1900c into main Jan 4, 2023
@diogob diogob deleted the imperative-submit branch January 4, 2023 18:59
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

Successfully merging this pull request may close these issues.

2 participants