allenhwkim / angularjs-google-maps

The Simplest AngularJS Google Maps V3 Directive
http://ngmap.github.io
MIT License
1.52k stars 516 forks source link

Autocomplete first choice default #856

Closed Alarty closed 6 years ago

Alarty commented 6 years ago

When implementing autocomplete input, even in your example (https://ngmap.github.io/#/!places-auto-complete.html) you need to select one of the suggested entries to perform the action.

So if you start typing e.g. "Texa" and hit enter key, nothing happened (or more precisely an error but it's not the point).

A great thing would be to add an option, that take the first suggested entry and typing "Texa" and hit enter would redirect to Texas.

allenhwkim commented 6 years ago

Please take a look at this.

https://stackoverflow.com/a/27867610/454252

or use AutocompleteService to prefill the value. https://stackoverflow.com/a/43101062/454252

Alarty commented 6 years ago

Great, the first link did the trick.

Don't you think it would be a good add to your library ?

allenhwkim commented 6 years ago

Don't you think it would be a good add to your library ?

No, I don't think so. This module wants to work nothing but as a wrapper of Google Maps. I am trying not to introduce another attribute( or parameter) to users, so that they don't need to learn one more.

image