I think the problem is that your observer is notified too soon, which means that the changes have not yet been written to the DOM.
, , , Ember.run.sync(), chosen , . http://jsfiddle.net/pangratz666/dbHJb/
<script type="text/x-handlebars" data-template-name="selectTmpl" >
{{#each items tagName="select" }}
<option {{bindAttr value="id"}} >{{name}}</option>
{{/each}}
</script>
JavaScript
App = Ember.Application.create({});
App.items = Ember.ArrayProxy.create({
content: [Ember.Object.create({
id: 1,
name: 'First item'
}), Ember.Object.create({
id: 2,
name: 'Second Item'
})]
});
Ember.View.create({
templateName: 'selectTmpl',
itemsBinding: 'App.items',
didInsertElement: function() {
this.$('select').chosen();
},
itemsChanged: function() {
Ember.run.sync();
Ember.run.next(this, function() {
this.$('select').trigger('liszt:updated');
});
}.observes('items.@each.name')
}).append();
Ember.run.later(function() {
App.items.objectAt(0).set('name', '1st Item');
}, 1000);