Skip to content

Commit

Permalink
rerender the compositeView's collection when it is sorted (new behavi…
Browse files Browse the repository at this point in the history
…or post update)
  • Loading branch information
davidsulc committed Jan 29, 2013
1 parent 1063526 commit 7f2f0b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/javascripts/application.js
Expand Up @@ -135,6 +135,10 @@ AngryCatsView = Backbone.Marionette.CompositeView.extend({
template: "#angry_cats-template",
itemView: AngryCatView,

initialize: function(){
this.listenTo(this.collection, "sort", this.renderCollection);
},

appendHtml: function(collectionView, itemView){
collectionView.$("tbody").append(itemView.el);
}
Expand Down

0 comments on commit 7f2f0b1

Please sign in to comment.