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.

Enter key behaviour

See original GitHub issue

First of all: thank you for a very useful component!

  • vue-autosuggest version: 1.3.1
  • node version: 9.4.0
  • npm (or yarn) version: 5.7.1
            <vue-autosuggest
                ref="autosuggest"
                @keyup.enter="doSearch"
                :suggestions="suggestions"
                :inputProps="inputProps"
                :renderSuggestion="renderSuggestion"
                :getSuggestionValue="getSuggestionValue"
                :onSelected="onSelected"
            />

Problem description: I want to use the autosuggest as a searchbar and suggester works very nice, but when the user hits enter my search function isn’t called despite the @keyup.enter

Suggested solution: It seems the enter key event is overridden in the component for selecting a value from the dropdown list. If the list is closed the override should be ignored.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
darrenjenningscommented, Mar 26, 2018

@paulheijman you can now do @keyup.enter and any other native event you’d like to attach to the <input> as of 1.4.1. Thanks for the suggestion and I think this is a great feature. Drafting release notes now.

0reactions
cssndrxcommented, Jan 23, 2021

Ah doh! Figured it out. It’s bound to v-model.

Amazing component, thank you Darren!

Read more comments on GitHub >

github_iconTop Results From Across the Web

EnterKeyBehavior property - Microsoft Learn
Defines the effect of pressing ENTER in a TextBox. Syntax. object.EnterKeyBehavior [= Boolean ]. The EnterKeyBehavior property syntax has these ...
Read more >
Tab Vs Enter key behavior in a form - Designer News
let's consider a form with two input fields (let's call them A and B), that A is currently active but empty, and that...
Read more >
How to Change the Behavior of the Enter Key in Excel
The first option in this menu controls how the Enter key behaves. You can uncheck the box if you don't want the Enter...
Read more >
Is there a default behaviour for pressing the ENTER key on an ...
Something that is frustrating and creates a poor user experience is when someone hits the ENTER key expecting to start a new line...
Read more >
enter key behaviour - Visual Studio Feedback
Strange behaviour for radio buttons… I then selected the “Never add new line on enter” option but still intellisense keeps adding new lines....
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