From 5f5fafbb229b8a31fb7f4d509b549c90a31c27b9 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Fri, 17 Feb 2012 23:10:03 +0000 Subject: [PATCH] [#49,view][xs]: sort from DataTable working again. * And this change shows how new setup is nicer (i.e. cleaner) :-) --- src/view.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/view.js b/src/view.js index 791cbd4c..ed7effaf 100644 --- a/src/view.js +++ b/src/view.js @@ -323,8 +323,11 @@ my.DataTable = Backbone.View.extend({ }, setColumnSort: function(order) { - var query = _.extend(this.model.queryState, {sort: [[this.state.currentColumn, order]]}); - this.model.query(query); + this.model.query({ + sort: [ + [this.state.currentColumn, order] + ] + }); }, hideColumn: function() {