M
M
MaximPatrushev2019-08-20 22:47:45
Angular
MaximPatrushev, 2019-08-20 22:47:45

Strange behavior when working with googlemaps autocomplete, maybe a bug?

An example with the code https://stackblitz.com/edit/angular-6frp3g
The essence of the task is quite simple - there is an input with google.maps autocomplete. Below is a list of selected cities. When choosing a city in the input, you must add it to the list. The essence of the problem - when choosing a city, the list is not re-rendered, that is, the click seems to be processed correctly, the value from the input is returned, but the list is not updated. In this case, if you click back to the input or resize the window, the list will be updated. I can't figure out if this is an autocomplete bug or some nuance of angular, I'll be grateful for your help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaximPatrushev, 2019-08-20
@MaximPatrushev

The solution was found, the problem was that the callback worked outside the angular zone and change detection did not work. An example with a solution in case it is useful to someone. https://stackblitz.com/edit/angular-6frp3g

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question