I'm using ember-select-2 as a typeahead in ember application.the problem is i can fetch the data from the server but the data isn't showing in dropdown.any help would be appreciated.Thanks in advance.
{{select-2
placeholder="Choose from our many pizzas"
value=chosenTypeaheadPizza
typeaheadSearchingText="Searching pizzas"
typeaheadNoMatchesText="No pizzas found for '%@'"
typeaheadErrorText="Loading failed: %@"
query="queryPizzas"
}}
and action handler is
queryPizzas(query) {
var self = this;
var store = self.get('store');
let adapter = store.adapterFor("pizzas");
let serachQuery = query.term;
adapter.searchPizza(serachQuery).then(function(response) {
console.log(response.pizzas);
});
},
Response
{
"pizzas": [{
"id": 1,
"name": "pizza 1"
}, {
"id": 2,
"name": "pizza 2"
}]
}