Sospetto che ci sia un modo per aggiornare un proxy Ember.Array che attiverà le notifiche di Ember ma cosa non riesco a capire come.Modifiche Ember.ArrayProxy non attivano manubri #each update
Sto sovrascrivendo la proprietà "content" per aggiornare l'array. L'array si aggiorna ma la vista no.
App.items = Ember.ArrayProxy.create({
content: [
Ember.Object.create({ name: 'Me', city: 'new york'}),
Ember.Object.create({ name: 'You', city: 'boston'})
],
sortByCity: function() {
this.set('content', this.get('content').sort(function(a,b) {
return a.get('city') > b.get('city')
}));
}
});
Ecco un violino che illustra il problema http://jsfiddle.net/alexrothenberg/za4Ha/1/
Ogni aiuto è apprezzato. Grazie!
Grazie questo non risolvere il mio problema. – alexrothenberg