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