Skip to content

Commit

Permalink
set options
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmello committed Feb 6, 2018
1 parent cc96f15 commit 4ff5f52
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ export class AngularGooglePlaceDirective implements OnInit {

@HostListener('focus', ['$event.target'])
onFocus(target: any) {
if (this.options) {
this.autocomplete.setTypes([this.options.type]);
this.autocomplete.setComponentRestrictions(this.options.componentRestrictions);
if (this.autocomplete && this.options) {
this.autocomplete.setOptions(this.options);
}
}

Expand Down

0 comments on commit 4ff5f52

Please sign in to comment.