You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using it in a project of mine and it works flawlessly.
Unfortunately I have recently run into an issue with the Autocomplete component.
It follows from the Autocomplete component's description in the readme that it can be used independently in an application. However, if you were to instantiate two or more instances of it, you'd get an error stating that you have a duplicate #pac-input id on the page.
After digging in, I found out that Autocomplete component hard sets that id on line 22 of Autocomplete.vue:
Considering thatgoogleMapsReady() function is invoked by Ready mixin in its mounted hook, wouldn't it be better to use a $ref instead?
That would allow for multiple components to be rendered on the same page without any modifications to the underlying functionality.
The text was updated successfully, but these errors were encountered:
Hello there and thank you for the component!
I've been using it in a project of mine and it works flawlessly.
Unfortunately I have recently run into an issue with the Autocomplete component.
It follows from the Autocomplete component's description in the readme that it can be used independently in an application. However, if you were to instantiate two or more instances of it, you'd get an error stating that you have a duplicate
#pac-input
id on the page.After digging in, I found out that Autocomplete component hard sets that id on line 22 of
Autocomplete.vue
:and only referencces it once on line 111:
Considering that
googleMapsReady()
function is invoked by Ready mixin in itsmounted
hook, wouldn't it be better to use a$ref
instead?That would allow for multiple components to be rendered on the same page without any modifications to the underlying functionality.
The text was updated successfully, but these errors were encountered: