Fix changing event uuid didn't change event data

Closes #1192

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-11-21 11:52:41 +01:00
parent e1469a5eec
commit 32706150e0
2 changed files with 12 additions and 3 deletions

View File

@@ -298,11 +298,19 @@ const props = defineProps<{
const { t } = useI18n({ useScope: "global" });
const propsUUID = computed(() => props.uuid)
const {
event,
onError: onFetchEventError,
loading: eventLoading,
refetch: refetchEvent,
} = useFetchEvent(props.uuid);
watch(propsUUID, (newUUid) => {
refetchEvent({ uuid: newUUid })
})
const eventId = computed(() => event.value?.id);
const { currentActor } = useCurrentActorClient();
const currentActorId = computed(() => currentActor.value?.id);