Reputation: 334
Is it possible to sort the content of an ArrayController by both multiple fields and multiple directions? Would this work, trying a sort like "lastName ASC, zip DESC":
App.TableController = Ember.ArrayController.extend({
sortProperties: ['lastName', 'zip'],
sortAscending: [true, false]
})
I searched posts here and through the Ember docs but couldn't find any information on multiple 'sortAscending' options.
Bryan
Upvotes: 0
Views: 43
Reputation: 37379
Unfortunately, it's not possible, as noted by this discussion. You'd have to write your own sorting function to do it.
Upvotes: 1