This is a follow up to: accessing another models data in ember.js
I have a situation where I would like to filter a list with a chosen multi-select box. When sending the data, this.store.find('tag')
always returns a DS.PromiseArray. The Ember.Select seems to handle this fine, but the chosen multi select doesn't seem to like it. I have seen something like this:
this.store.find('tag').then(function(items) {
return items.map(function(item){
return [item.get('id'), item.get('name')]
})
})
but I always seem to get a typeerror{} on the map function...
Here is a jsfiddle that outlines the problem: http://jsfiddle.net/viciousfish/TEZjW/
Bonus Points! demo shows the chosen select as a single select (for clarity). I would like to use this as a multi select, which can be set by setting multiple: true
in App.MultipleSelect
Update here is another jsfiddle with what I think should work, but doesn't seem to! http://jsfiddle.net/viciousfish/FZ6yw/1/
And even further, this fiddle shows that the .then should work to deconstruct the promiseArray http://jsfiddle.net/marciojunior/DGT5L/