Skip to content
Snippets Groups Projects
Commit 0a2deeac 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 fe6d0739
No related branches found
No related tags found
2 merge requests!355Implement infinite scrolling and by date navigation for coursebook,!350Resolve "Add simple course book list"
......@@ -6,6 +6,7 @@
:enable-create="false"
:enable-edit="false"
:elevated="false"
@items="docsByDay = groupDocsByDay($event)"
@lastQuery="lastQuery = $event"
ref="iterator"
disable-pagination
......@@ -15,9 +16,9 @@
<template #additionalActions="{ attrs, on }">
<coursebook-filters v-model="filters" />
</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()"
......@@ -101,6 +102,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