diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index 241937a4e..1c6b260c8 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n'; import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue'; import { useArrayData } from 'composables/useArrayData'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; +import { useState } from 'src/composables/useState'; const $props = defineProps({ url: { @@ -35,6 +36,8 @@ const $props = defineProps({ default: null, }, }); + +const state = useState(); const slots = useSlots(); const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); @@ -64,6 +67,7 @@ async function getData() { isLoading.value = true; try { const { data } = await arrayData.fetch({ append: false, updateRouter: false }); + state.set($props.dataKey, data); emit('onFetch', data); } finally { isLoading.value = false; diff --git a/src/pages/Entry/Card/EntryDescriptor.vue b/src/pages/Entry/Card/EntryDescriptor.vue index d1df63c3b..bb7a20dd0 100644 --- a/src/pages/Entry/Card/EntryDescriptor.vue +++ b/src/pages/Entry/Card/EntryDescriptor.vue @@ -109,7 +109,7 @@ const showEntryReport = () => { :title="data.title" :subtitle="data.subtitle" @on-fetch="setData" - data-key="entryData" + data-key="entry" >