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

Add possibility to pass in additional FormData fields via data prop #8

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Add possibility to pass in additional FormData fields via data prop #8

merged 1 commit into from
Jul 24, 2023

Conversation

rastapasta
Copy link
Contributor

Aloha @rossmartin , thanks for sharing your work with us. I needed exactly such a straight forward hook but was missing the option to pass in additional form fields - so here we go with a simple PR. Cheers!

@rossmartin
Copy link
Owner

Hey @rastapasta you are very welcome and glad you've found this helpful. And thank you a bunch for adding this ability.

When I am done with my day job later today I'll get this approved and in. Then get a new version published.

if (data)
for (const key in data)
formData.append(key, data[key]);

Copy link
Owner

Choose a reason for hiding this comment

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

Looks like eslint will fail on this but I'll fix after this is merged.

@rossmartin rossmartin merged commit 5b6537d into rossmartin:main Jul 24, 2023
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