Skip to content

feat(events): add form reset event #368

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

Merged
merged 2 commits into from
Oct 2, 2019

Conversation

pheeria
Copy link
Contributor

@pheeria pheeria commented Oct 2, 2019

Hi all!
This is my first PR to a popular OSS project.

What:

Forms have submit, but lack reset event.

Why:

Using form events instead of direct button callbacks comes handy sometimes, when using form templates with variable content.

How:

Events were extended to contain reset event applicable on <form /> tags.

Checklist:

Comments:

  1. I think updating docs is not necessary since the following line covers everything.
Convenience methods for firing DOM events. Check out src/events.js for a full list as well as default eventProperties.
  1. I can prepare a types PR if this one will be accepted.

eps1lon
eps1lon previously approved these changes Oct 2, 2019
Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Thanks!

kentcdodds
kentcdodds previously approved these changes Oct 2, 2019
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

This is great, thank you for your help here! If you could update the test as you suggested that would be great 💯

@pheeria pheeria dismissed stale reviews from kentcdodds and eps1lon via 981de76 October 2, 2019 17:19
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Thanks!

@kentcdodds kentcdodds merged commit eadf8b6 into testing-library:master Oct 2, 2019
@kentcdodds
Copy link
Member

@all-contributors please add @pheeria for code and tests

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @pheeria! 🎉

@kentcdodds
Copy link
Member

🎉 This PR is included in version 6.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants