Commit 5169fabb authored by Sam Saccone's avatar Sam Saccone

Merge pull request #1273 from elie29/patch-1

Debounce the rendering of the application view
parents 071992fa 4870aae2
......@@ -38,7 +38,7 @@ var app = app || {};
this.listenTo(app.todos, 'reset', this.addAll);
this.listenTo(app.todos, 'change:completed', this.filterOne);
this.listenTo(app.todos, 'filter', this.filterAll);
this.listenTo(app.todos, 'all', this.render);
this.listenTo(app.todos, 'all', _.debounce(this.render, 0));
// Suppresses 'add' events with {reset: true} and prevents the app view
// from being re-rendered for every model. Only renders when the 'reset'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment