From d891dd12fb9ef6f3b64ae3f9b2ff2aa0204bd32b Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 25 Feb 2015 19:38:01 +0300 Subject: [PATCH] trigger event beforeSort to be able to change collection state in plugins. --- src/body.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/body.js b/src/body.js index 5c123d9a..a68db743 100644 --- a/src/body.js +++ b/src/body.js @@ -276,6 +276,8 @@ var Body = Backgrid.Body = Backbone.View.extend({ return model.cid.replace('c', '') * 1; }); + collection.trigger("backgrid:beforeSort", column, direction); + if (Backbone.PageableCollection && collection instanceof Backbone.PageableCollection) {