Fixed: Initial sorting for Next Airing

This commit is contained in:
Mark McDowall 2014-01-16 09:18:53 -08:00
parent 442ab2b7c4
commit 4962db3b6a
3 changed files with 36 additions and 28 deletions

View file

@ -63,6 +63,21 @@ define(
return '1';
};
_.extend(this.prototype, {
initialSort: function () {
var key = this.state.sortKey;
var order = this.state.order;
if (this.sorters && this.sorters[key] && this.mode === 'client') {
var sortValue = this[key];
var comparator = this._makeComparator(key, order, sortValue);
this.fullCollection.comparator = comparator;
this.fullCollection.sort();
}
}
});
return this;
};
}