Skip to content
Snippets Groups Projects
Commit d8abf657 authored by permcu's avatar permcu
Browse files

Get docsByDay out of template and use it as state in the component

This is the foundation of continuous loading (fetchMore).
parent 1863fe8b
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
:enable-create="false"
:enable-edit="false"
:elevated="false"
@items="docsByDay = groupDocsByDay($event)"
@lastQuery="lastQuery = $event"
ref="iterator"
disable-pagination
......@@ -56,9 +57,9 @@
</div>
</div>
</template>
<template #default="{ items }">
<template #default>
<v-list-item
v-for="day in groupDocsByDay(items)"
v-for="day in docsByDay"
two-line
:key="'day-' + day[0]"
:id="'documentation_' + day[0].toISODate()"
......@@ -144,6 +145,7 @@ export default {
data() {
return {
gqlQuery: documentationsForCoursebook,
docsByDay: {},
lastQuery: null,
// Placeholder values while query isn't completed yet
groups: [],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment