prevent unnecessary re-searches on unchanged filter after page restore
This commit is contained in:
parent
1ac9be1b6f
commit
72c7dc9c49
|
@ -122,7 +122,11 @@ export default {
|
||||||
this.filter.camera = query['camera'] ? parseInt(query['camera']) : 0;
|
this.filter.camera = query['camera'] ? parseInt(query['camera']) : 0;
|
||||||
this.filter.country = query['country'] ? query['country'] : '';
|
this.filter.country = query['country'] ? query['country'] : '';
|
||||||
this.settings.view = this.viewType();
|
this.settings.view = this.viewType();
|
||||||
this.lastFilter = {};
|
|
||||||
|
if (JSON.stringify(this.lastFilter) !== JSON.stringify(this.filter)) {
|
||||||
|
this.lastFilter = {};
|
||||||
|
}
|
||||||
|
|
||||||
this.routeName = this.$route.name;
|
this.routeName = this.$route.name;
|
||||||
|
|
||||||
if (this.uid !== this.$route.params.uid) {
|
if (this.uid !== this.$route.params.uid) {
|
||||||
|
|
|
@ -183,9 +183,10 @@ export default {
|
||||||
const filterChanged = JSON.stringify(this.lastFilter) !== JSON.stringify(this.filter);
|
const filterChanged = JSON.stringify(this.lastFilter) !== JSON.stringify(this.filter);
|
||||||
if (filterChanged) {
|
if (filterChanged) {
|
||||||
this.lastFilter = {};
|
this.lastFilter = {};
|
||||||
this.routeName = this.$route.name;
|
|
||||||
this.search();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.routeName = this.$route.name;
|
||||||
|
this.search();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
Loading…
Reference in a new issue