Skip to content

Ionic 3 - Multiple AutoComplete controls on same page #171

Description

@hernancantori

I'd like to know if its possible to access multiple AutoComplete controls on the same page. I have no problem retrieving values from backend for all of them, but I can't get the values selected.,

the searchbar variable actually points to the second autocomplete control, while searchbar2 is undefined.

image

In my HTML:
<ion-auto-complete [dataProvider]="provider" #searchbar>
<ion-auto-complete [dataProvider]="provider2" #searchbar2>

In my .ts:
@ViewChild('searchbar')
@ViewChild('searchbar2')
searchbar: AutoCompleteComponent;
searchbar2: AutoCompleteComponent;

I dont know if im doing something wrong, please advice!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions