--- a/cms/app-client/app/routes/tabs/thematiques.js Sat Oct 15 16:15:07 2016 +0530
+++ b/cms/app-client/app/routes/tabs/thematiques.js Sat Oct 15 20:02:09 2016 +0530
@@ -29,6 +29,10 @@
controller.set('themes', this.get('themes'));
},
+ deactivate: function () {
+ this.set('themes', []);
+ },
+
actions: {
setIndexQueryparams: function() {
@@ -37,11 +41,15 @@
setSortQueryparams: function(sort) {
this.set('sort', sort);
- this.get('themes').replaceContent(0, this.get('themes').get('content').length, null);
- // Force property reset to trigger request.
- this.propertyWillChange('index');
- this.set('index', 0);
- this.propertyDidChange('index');
+ this.get('themes').get('content').clear();
+ if(this.get('index') === 0) {
+ // Force property reset to trigger request
+ this.propertyWillChange('index');
+ this.set('index', 0);
+ this.propertyDidChange('index');
+ } else {
+ this.set('index', 0);
+ }
}
}