diff --git a/map/client/components/location/KLocationCardSection.vue b/map/client/components/location/KLocationCardSection.vue index 34a78d8d3..f9ce3c932 100644 --- a/map/client/components/location/KLocationCardSection.vue +++ b/map/client/components/location/KLocationCardSection.vue @@ -37,10 +37,14 @@ import KLocationMap from './KLocationMap.vue' // Props const props = defineProps({ - location: { + item: { type: Object, default: () => null }, + locationPath: { + type: String, + default: 'location' + }, actions: { type: [Object, Array], default: () => null @@ -59,7 +63,7 @@ const props = defineProps({ const feature = ref(null) // Watch -watch(() => props.location, (value) => { - feature.value = value +watch(() => [props.item, props.location], () => { + feature.value = _.get(props.item, props.locationPath) }, { immediate: true })