mirror of
https://github.com/pinry/pinry.git
synced 2026-07-04 13:28:44 +02:00
Fix: Fix all Pin filter load error
Route state chagne should be watched by child component.
This commit is contained in:
committed by
Isaac Bythewood
parent
83e85e9e7b
commit
47778d492e
@@ -148,6 +148,11 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
pinFilters() {
|
||||
this.reset();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
shouldShowEdit(id) {
|
||||
if (!this.editorMeta.user.loggedIn) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import PHeader from '../components/PHeader.vue';
|
||||
import Pins from '../components/Pins.vue';
|
||||
|
||||
export default {
|
||||
name: 'p-header',
|
||||
name: 'Pins4Board',
|
||||
data() {
|
||||
return {
|
||||
filters: { boardFilter: null },
|
||||
@@ -20,16 +20,16 @@ export default {
|
||||
PHeader,
|
||||
Pins,
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
this.filters = { boardFilter: to.params.boardId };
|
||||
next();
|
||||
},
|
||||
created() {
|
||||
this.initializeBoard();
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
this.initializeBoard();
|
||||
next();
|
||||
},
|
||||
methods: {
|
||||
initializeBoard() {
|
||||
this.filters.boardFilter = this.$route.params.boardId;
|
||||
this.filters = { boardFilter: this.$route.params.boardId };
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -24,12 +24,12 @@ export default {
|
||||
this.initialize();
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
this.initialize();
|
||||
this.filters = { idFilter: to.params.pinId };
|
||||
next();
|
||||
},
|
||||
methods: {
|
||||
initialize() {
|
||||
this.filters.idFilter = this.$route.params.pinId;
|
||||
this.filters = { idFilter: this.$route.params.pinId };
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -24,12 +24,12 @@ export default {
|
||||
this.initializeTag();
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
this.initializeTag();
|
||||
this.filters = { tagFilter: to.params.tag };
|
||||
next();
|
||||
},
|
||||
methods: {
|
||||
initializeTag() {
|
||||
this.filters.tagFilter = this.$route.params.tag;
|
||||
this.filters = { tagFilter: this.$route.params.tag };
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -24,12 +24,12 @@ export default {
|
||||
this.initializeBoard();
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
this.initializeBoard();
|
||||
this.filters = { userFilter: to.params.user };
|
||||
next();
|
||||
},
|
||||
methods: {
|
||||
initializeBoard() {
|
||||
this.filters.userFilter = this.$route.params.user;
|
||||
this.filters = { userFilter: this.$route.params.user };
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user