question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make `preventDefault` on Typeahea configurable to allow forms to be submitted on `ENTER`

See original GitHub issue

The change that added these lines now prevent any forms that contain the Typeahead component from being submitted when the user presses ENTER.

Since this is a generic component, it seems this behavior should be configurable. An example of use case is when the user types something that does not match any items in the options list but still wants to submit the form any by pressing ENTER.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ericgiocommented, Mar 2, 2017

Thanks again to @hyzhak for the PR! This was added in v1.2.0.

0reactions
hyzhakcommented, Feb 6, 2017

@ericgio I have just push small PR with needed option

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to disable <ENTER> key for form submit in react- ...
I want to ignore the as a form submit, and only allow one to press the SUBMIT button. (I deleted some of the...
Read more >
does not submit the form when the "enter button" is pressed ...
I have a login page with two fields login and password and with a login button. Authorization occurs only when I click on...
Read more >
Event.preventDefault() - Web APIs | MDN
The preventDefault() method of the Event interface tells the user agent that if the event does not get explicitly handled, its default ...
Read more >
How to stop a form submit action using jQuery
There is one parameter e which represents the event parameter or object. We use the preventDefault() method with this event to prevent the ......
Read more >
Awesomplete - Lea Verou
2KB minified & gzipped! Ultra lightweight, customizable, simple autocomplete widget with zero dependencies, built with modern standards for modern browsers .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found