We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c74adfa commit 75e8e09Copy full SHA for 75e8e09
src/views/EventList.vue
@@ -23,8 +23,8 @@ export default {
23
EventCard
24
},
25
created() {
26
- this.perPage = 3 // Setting perPage here and not in data means it won't be reactive
27
- // We don't need it to be reactive.
+ this.perPage = 3 // Setting perPage here and not in data means it won't be reactive.
+ // We don't need it to be reactive, and this way our component has access to it.
28
29
this.$store.dispatch('fetchEvents', {
30
perPage: this.perPage,
@@ -36,7 +36,7 @@ export default {
36
return parseInt(this.$route.query.page) || 1
37
38
isLastPage() {
39
- return this.eventsTotal > this.page * this.perPage
+ return this.eventsTotal > this.page * 3
40
41
...mapState(['events', 'eventsTotal'])
42
}
0 commit comments