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

Autoselect first element on the list #433

Open
alessioviola opened this issue Jun 1, 2020 · 1 comment
Open

Autoselect first element on the list #433

alessioviola opened this issue Jun 1, 2020 · 1 comment

Comments

@alessioviola
Copy link

Hi guys,

is there a way to autoselect the first element on the list, while writing on input?

@azivkovi
Copy link

azivkovi commented Jun 9, 2020

#365

This pull request adds this feature, but is not yet merged in the master file.

As a workaround, I manually edited the EasyAutocomplete/dist/jquery.easy-autocomplete.js include file with the changes from the pull request:

if (event.keyCode === 13) {
	if (selectedElement == -1 && elementsList.length > 0) {
		// nothing is selected, so just autofill the first selection
		selectedElement = 0;
	}
}

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

No branches or pull requests

2 participants