force loading of items after switching to another event
This commit is contained in:
parent
b31f3758e0
commit
e4fa48eb75
1 changed files with 7 additions and 2 deletions
|
@ -67,7 +67,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapActions, mapGetters, mapMutations} from 'vuex';
|
import {mapActions, mapGetters, mapMutations, mapState} from 'vuex';
|
||||||
import Table from '@/components/Table';
|
import Table from '@/components/Table';
|
||||||
import Cards from '@/components/Cards';
|
import Cards from '@/components/Cards';
|
||||||
import Modal from '@/components/Modal';
|
import Modal from '@/components/Modal';
|
||||||
|
@ -83,7 +83,7 @@ export default {
|
||||||
}),
|
}),
|
||||||
components: {AsyncLoader, AuthenticatedImage, Table, Cards, Modal},
|
components: {AsyncLoader, AuthenticatedImage, Table, Cards, Modal},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['getEventItems', 'isItemsLoaded', 'layout']),
|
...mapGetters(['getEventItems', 'isItemsLoaded', 'layout', 'getEventSlug']),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['deleteItem', 'markItemReturned', 'loadEventItems', 'updateItem', 'scheduleAfterInit']),
|
...mapActions(['deleteItem', 'markItemReturned', 'loadEventItems', 'updateItem', 'scheduleAfterInit']),
|
||||||
|
@ -95,6 +95,11 @@ export default {
|
||||||
return window.confirm(message);
|
return window.confirm(message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
getEventSlug() {
|
||||||
|
this.scheduleAfterInit(() => [this.loadEventItems()]);
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.scheduleAfterInit(() => [this.loadEventItems()]);
|
this.scheduleAfterInit(() => [this.loadEventItems()]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue