kadoshms / ionic2-autocomplete

Ionic 2 autocomplete component
MIT License
149 stars 108 forks source link

setValue not working #162

Open geogeek11 opened 6 years ago

geogeek11 commented 6 years ago

i've tried to set initial value of the Autocomplete Component using different methods: i've tried this.searchbar.setValue() but it throws this error "this.DataProvider is undefined" set keyword in this manner <ion-auto-complete [keyword]="XXXXXX" .... did not work *set keyword this.searchbar.keyword = "XXXXXXX"; did not work

i don't know if there is another manner so set value of the autocomplete component.

Adejair commented 5 years ago

you resolved this problem? i'm with the same

geogeek11 commented 5 years ago

to set the placeholder I've used this code

<ion-auto-complete (itemSelected)="selected($event)" [options]="{ placeholder : 'Search', type : 'number' }" [dataProvider]="completeService" #searchbar >

wch94 commented 5 years ago

Having this issue as well