|
|
@@ -204,12 +204,15 @@ export default {
|
|
204
|
204
|
type(newType, oldType) {
|
|
205
|
205
|
if(!postTypes.includes(newType)) return console.warn('type not found...')
|
|
206
|
206
|
|
|
207
|
|
- if(this._getSortBy() != sortTypes.material) {
|
|
208
|
|
- this.setIntersectionLoader()
|
|
209
|
|
- }
|
|
|
207
|
+ this.setIntersectionLoader()
|
|
210
|
208
|
this.clearAndInitPostList()
|
|
211
|
209
|
},
|
|
212
|
210
|
$route(to, from) {
|
|
|
211
|
+ // Reset the intersection loader if navigating AWAY from material sort page
|
|
|
212
|
+ if(from.fullPath.includes(sortTypes.material)) {
|
|
|
213
|
+ this.setIntersectionLoader()
|
|
|
214
|
+ }
|
|
|
215
|
+
|
|
213
|
216
|
// Check if we changed sort method
|
|
214
|
217
|
// from no sort to sorted
|
|
215
|
218
|
// or sorted to no sort
|
|
|
@@ -225,10 +228,8 @@ export default {
|
|
225
|
228
|
}
|
|
226
|
229
|
},
|
|
227
|
230
|
mounted() {
|
|
|
231
|
+ this.setIntersectionLoader()
|
|
228
|
232
|
this.clearAndInitPostList()
|
|
229
|
|
- if(this._getSortBy() != sortTypes.material) {
|
|
230
|
|
- this.setIntersectionLoader()
|
|
231
|
|
- }
|
|
232
|
233
|
},
|
|
233
|
234
|
beforeDestroy() {
|
|
234
|
235
|
this.unsetIntersectionLoader()
|