From cd135d123795381e761106aff5cc1ed4ed76afc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A4ssin?= Date: Tue, 15 Oct 2024 11:09:50 +0200 Subject: [PATCH] add loading state to table --- pages/stundenplan.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/stundenplan.vue b/pages/stundenplan.vue index c0d7793..60938b8 100644 --- a/pages/stundenplan.vue +++ b/pages/stundenplan.vue @@ -17,7 +17,7 @@ Zurück zu Heute - + @@ -36,6 +36,8 @@ const data = useState('stundenplan', (() => [])); const schedule = computed(() => Object.values(groupedByDay.value)); + const hasLoaded = ref(false); + watch(groupedByDay.value, (newVal) => { const todayIndex = Object.keys(newVal).indexOf(today.toString()); if (todayIndex !== -1) { @@ -73,6 +75,8 @@ Bemerkungen: item["remarks"] || "---", }); }); + + hasLoaded.value = true; }); function logout() {