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

Dropdown fails when items are loaded async #610

Closed
cagataycivici opened this issue Jul 15, 2016 · 3 comments
Closed

Dropdown fails when items are loaded async #610

cagataycivici opened this issue Jul 15, 2016 · 3 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@cagataycivici
Copy link
Member

When options are loaded from a remote url, the label is not updated.

@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jul 15, 2016
@cagataycivici cagataycivici added this to the 1.0.0-beta.10 milestone Jul 15, 2016
@cagataycivici cagataycivici self-assigned this Jul 15, 2016
@battmanz
Copy link
Contributor

battmanz commented Mar 16, 2017

Does this mean that I can use the async pipe as the following example shows?

export class DemoComponent implements OnInit {
  public items: Observable<{ label: string, value: string }[]>;
  constructor(private http: Http) { }

  ngOnInit() {
    this.items = this.http.get('some/url/that/returns/items').map(response => response.json());
  }
}
<p-dropdown [options]="items | async"></p-dropdown>

I'm trying that, but it doesn't seem to work. I'm using primeng version 2.0.3.

@battmanz
Copy link
Contributor

Nevermind, I must have been doing something wrong. The async pipe works great!

@cagataycivici
Copy link
Member Author

Glad to hear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants