Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions app/components/Block/CardGroupDynamic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,16 @@ const filter = computed(() => {
return { _and: [blockFilter, additionalFilter] };
});

const cardsKey = 'cards-' + props.uuid + (unref(block)?.collection ?? '') + (unref(block)?.filter ?? '');
const countKey = 'count-' + props.uuid + (unref(block)?.collection ?? '') + (unref(block)?.filter ?? '');

onUnmounted(() => {
clearNuxtData(cardsKey);
clearNuxtData(countKey);
});

const { data: cards, pending } = await useAsyncData(
'cards-' + props.uuid + (unref(block)?.collection ?? '') + (unref(block)?.filter ?? ''),
cardsKey,
async () => {
const context = unref(block);

Expand Down Expand Up @@ -148,7 +156,7 @@ const { data: cards, pending } = await useAsyncData(
);

const { data: count } = await useAsyncData(
'count-' + props.uuid + (unref(block)?.collection ?? '') + (unref(block)?.filter ?? ''),
countKey,
() => {
const context = unref(block);

Expand Down
Loading