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

Typing in the search field should automatically highlight first match #1993

Open
huggla opened this issue Apr 5, 2024 · 4 comments
Open

Comments

@huggla
Copy link
Contributor

huggla commented Apr 5, 2024

When typing in the search field the first match should automatically be highlighted so that the user can just press enter. Now you have to press arrow down+enter, or click mouse even if there is only one match. This is a very common feedback we get from users that use the search a lot.

image

@Flodkvist
Copy link
Contributor

@jokd
Can this have conflicts with "searchlistOptions"?

@jokd
Copy link
Contributor

jokd commented May 15, 2024

@jokd Can this have conflicts with "searchlistOptions"?

It most likely will since they both gets triggered when hitting enter.

@huggla
Copy link
Contributor Author

huggla commented Jun 19, 2024

If someone wants to have this behavior in a fork, just change autoFirst: false to true in the function initAutocomplete in src/controls/search.js.

@MattiasSp
Copy link
Contributor

If the enter key could act differently when there is just the one match, it would be a really intuitive and useful feature. I see no point in opening the searchlist if there is only one match, except maybe to access some searchlist export buttons. Such export buttons could still be accessed from the featureInfo window if also configured as layerSpecificExports.

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

5 participants