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

feat(enter): make enter work inside form #161

Merged
merged 1 commit into from
Aug 30, 2017
Merged

feat(enter): make enter work inside form #161

merged 1 commit into from
Aug 30, 2017

Conversation

codiemullins
Copy link
Contributor

@codiemullins codiemullins commented Aug 30, 2017

What: Allow enter key to submit form, if downshift is inside a form tag.

Why: So form can be submitted with enter key if focus is on downshift input.

How: Moved event.preventDefault() so it only executes if menu is open

Checklist:

  • Documentation - N/A
  • Tests (kind of, added a story book... may need unit test? Wasn't sure)
  • Ready to be merged
  • Added myself to contributors table

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.

Most excellent! Thank you very much for this!

@codecov-io
Copy link

Codecov Report

Merging #161 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #161   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           4      4           
  Lines         267    267           
  Branches       64     64           
=====================================
  Hits          267    267
Impacted Files Coverage Δ
src/downshift.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bafbcd...ae542b0. Read the comment docs.

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.

None yet

3 participants