fix: refs #6480 reactivity

This commit is contained in:
Jorge Penadés 2024-04-19 11:57:04 +02:00
parent 2450d5bf7a
commit 3fb155e697
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
<script setup>
import { onBeforeMount, watch, computed, ref } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue';
import { useArrayData } from 'composables/useArrayData';
@ -39,6 +40,7 @@ const $props = defineProps({
const state = useState();
const { t } = useI18n();
const route = useRoute();
const { viewSummary } = useSummaryDialog();
const arrayData = useArrayData($props.dataKey || $props.module, {
url: $props.url,
@ -55,7 +57,7 @@ defineExpose({
onBeforeMount(async () => {
await getData();
watch(
() => $props.url,
() => route.params.id,
async () => await getData()
);
});