Fix item fetching in calendar layout when switching view (#22517)

This commit is contained in:
Pascal Jufer
2024-05-21 12:42:30 +02:00
committed by GitHub
parent 8706b9daba
commit c849947751
2 changed files with 8 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@directus/app": patch
---
Ensured items are correctly loaded when switching the view in the calendar layout

View File

@@ -62,6 +62,9 @@ export default defineLayout<LayoutOptions>({
return null;
}
// Subscribe to 'view' updates to get latest start/end dates
void viewInfo.value;
const start = formatISO(calendar.value.view.activeStart);
const end = formatISO(calendar.value.view.activeEnd);
const startsHere = { [startDateField.value]: { _between: [start, end] } };