Skip to content
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

Dynamic options #191

Closed
Andrii-A opened this issue Sep 18, 2019 · 2 comments
Closed

Dynamic options #191

Andrii-A opened this issue Sep 18, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Andrii-A
Copy link

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [x] feature request

OS and Version?

Windows 10

Versions

Angular CLI: 8.2.1
Node: 10.15.1
OS: win32 x64
Angular: 8.2.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

@angular-devkit/architect 0.802.1
@angular-devkit/build-angular 0.802.1
@angular-devkit/build-optimizer 0.802.1
@angular-devkit/build-webpack 0.802.1
@angular-devkit/core 8.2.1
@angular-devkit/schematics 8.2.1
@angular/cdk 8.1.3
@angular/cli 8.2.1
@angular/material 8.1.3
@ngtools/webpack 8.2.1
@schematics/angular 8.2.1
@schematics/update 0.802.1
rxjs 6.4.0
typescript 3.5.3
webpack 4.38.0

Issue

Hello,

I would like to use the autocomplete as a directive with dynamic options and change some params based on user input in runtime.

I found that the directive accepts [country] only once - when I change it, directive doesn't know about it.

Is it known issue?

thanks.


<input type="text" matInput placeholder="Primary Address" formControlName="primaryAddressFormControl"
matGoogleMapsAutocomplete
[country]="selectedCountry"
(onAutocompleteSelected)="handleAddressChange($event)">


handleCountryChange($event) {
this.selectedCountry = $event;
}


@Andrii-A Andrii-A changed the title Hello, I would like to use the directive with an options object and change some params based on user input in runtime. I found that the directives accepts options only once - when I change the options object, directive doesn't know about it. Is it known issue? thanks. Dynamic options Sep 18, 2019
@AnthonyNahas AnthonyNahas self-assigned this Oct 27, 2019
@AnthonyNahas
Copy link
Member

@Andrii-A Thanks for contributing!

I will try to fix that!

@AnthonyNahas AnthonyNahas added the bug Something isn't working label Oct 27, 2019
@ryancraigmartin
Copy link

ryancraigmartin commented Dec 3, 2020

I am running into this same issue. Trying to pass a value into the autocomplete input so that it can resolve it as a defaulted option onInit. Was this ever resolved or is there a good work-around?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants