angular-material-extensions / google-maps-autocomplete

Autocomplete input component and directive for google-maps built with angular and material design |
https://angular-material-extensions.github.io/google-maps-autocomplete
MIT License
169 stars 60 forks source link

Two dropdowns with results appear when using [types] and [country] properties on the input, HTTP request is sent twice #336

Open adammurin opened 1 month ago

adammurin commented 1 month ago

OS and Version?

macOS 14.5

Versions

Node: 20.11.1 NPM: 10.2.4 Angular: 16

Repro steps

This is the HTML of the input that I use: `<input *ngIf="!user" #addressPickupElement matGoogleMapsAutocomplete type="address" (onAutocompleteSelected)="handleAddressChange($event)" [(ngModel)]="cart.address" (ngModelChange)="inputChanged($event)" placeholder="Zadajte adresu vyzdvihnutia" class="form-input" name="temp-address-input-field" [types]="['address']" [country]="['sk']"

`

As you start typing the address in the input, you can notice two HTTP requests are sent for each character typed. After you write cca 6th character (depends on particualar address), you can see two dropdowns - one containing results with applied filters (types=address and country=sk), another one just below without applied filters

Screenshot 2024-07-17 at 10 04 37

The log given by the failure

No error in console nor during compiling

Desired functionality

I want to filter the autocomplete results by types and country, and see only one dropdown with the filtered results.

Mention any other details that might be useful

Thanks!