-
Notifications
You must be signed in to change notification settings - Fork 35
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
Multiple autocomplete fields on the same page does not autocomplete correctly #2
Comments
I encourage you to branch off this gem. Then substitute the current JS implementation with a JS class based solution, using coffeescript. This should allow creating multiple instances of the same class and thus solve your issue. Maybe we can work on this as a team ;) |
That would be interesting to do, but I am very new to web development. Any idea of how much time this would take for a novice, and would you be able to point me in the right direction for good resources to learn from? |
I just pushed a partial conversion to coffescript using a class to package the functionality. You can help work on it ;) |
See the update section in the readme. Check out And http://arcturo.github.io/library/coffeescript/03_classes.html |
Thanks, that was really fast! I've tried using it, but for some reason, I keep getting the error that GmapsCompleter is not defined. I've made sure the file is included in the source, and it compiles to exactly what you have in the assets folder, but for some reason, the method is not being found. Just to clarify, in order to start it now, should |
I got it working. I made a pull request with a couple small changes to the coffeescript (and compiled coffeescript), and an updated readme with instructions on how to use the new class. However, I only tested it with autocomplete, so issues may still exist with the map features. |
Any update on using it for multiple input fields? As per General info on this repo
It should work, if it is correct then please close this issue. |
Please someone re-engineer this class using ES6 classes and modules. Cheers ;) |
Hi,
First, I want to say thanks for writing this great gem. It makes using gmaps autocomplete much easier, and gives me better results than other solutions.
I am currently trying to get multiple autocomplete fields on the same page, and by initializing gmaps-autocomplete with different input-field ids, it does work as intended (with respect to showing autocomplete results).
However, if you choose a result and autocomplete, it will also autocomplete all fields that occur after the chosen field (e.g. autocompleting address field 1 will fill address field 2 and 3 with the same results, autocompleting address field 2 will fill address field 3 with the same results, and autocompleting address 3 will result in the expected behavior).
The text was updated successfully, but these errors were encountered: