From 3c1b5385bafe550cdc5fc3075795fc6719c897d2 Mon Sep 17 00:00:00 2001 From: geogolem Date: Mon, 6 Mar 2017 09:04:08 -0500 Subject: [PATCH] im not too sure why this fixes the problem but now the filterState is respected when returning from another page --- src/UI/Movies/Index/MoviesIndexLayout.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/UI/Movies/Index/MoviesIndexLayout.js b/src/UI/Movies/Index/MoviesIndexLayout.js index 1097efac4..9ef465b59 100644 --- a/src/UI/Movies/Index/MoviesIndexLayout.js +++ b/src/UI/Movies/Index/MoviesIndexLayout.js @@ -150,10 +150,10 @@ module.exports = Marionette.Layout.extend({ this._showFooter(); }); - this.listenTo(this.seriesCollection, 'sync', function(model, collection, options) { + /*this.listenTo(this.seriesCollection, 'sync', function(model, collection, options) { this._renderView(); //MoviesCollectionClient.fetch(); - }); + });*/ this.listenTo(this.seriesCollection, "change", function(model) { if (model.get('saved')) { model.set('saved', false); @@ -292,13 +292,15 @@ module.exports = Marionette.Layout.extend({ }, onShow : function() { - this._showToolbar(); - //this._fetchCollection(); - if (window.shownOnce) { - this._fetchCollection(); - this._showFooter(); - } - window.shownOnce = true; + this.listenToOnce(this.seriesCollection, 'sync', function() { + this._showToolbar(); + //this._fetchCollection(); + if (window.shownOnce) { + //this._fetchCollection(); + this._showFooter(); + } + window.shownOnce = true; + }); }, _showTable : function() {