I’m using ember 1.0 pre and have a basic array controller that starts out with a default sort property of ‘id’
PersonApp.PersonController = Ember.ArrayController.extend({
content: [],
sortProperties: ['id'],
updateSort: function(column) {
this.set('sortProperties', column);
}
});
I’d like to set this dynamically and have the dom updated for free. But when I do a simple setter (shown above) it doesn’t update anything in my view or on the dom.
If I need the ability to update this dynamically how can I go about it?
The
sortPropertiesmust be an array, so I don’t know if in your case,columnis one.Here is a js fiddle showing you dynamically setting it: http://jsfiddle.net/Sly7/jZVJA/22/