From 87f6363d74e92c34e60b9e3a6dd86b71ed8cf0c6 Mon Sep 17 00:00:00 2001 From: flisowna Date: Wed, 1 Mar 2023 15:25:04 +0100 Subject: [PATCH] WIP popupcontent adjustments --- packages/nc-gui/components/smartsheet/Map.vue | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/smartsheet/Map.vue b/packages/nc-gui/components/smartsheet/Map.vue index c8f6cbfa12..37f2add3ea 100644 --- a/packages/nc-gui/components/smartsheet/Map.vue +++ b/packages/nc-gui/components/smartsheet/Map.vue @@ -6,6 +6,8 @@ import { ViewTypes } from 'nocodb-sdk' import { IsPublicInj, OpenNewRecordFormHookInj, latLongToJoinedString, onMounted, provide, ref } from '#imports' import type { Row as RowType } from '~/lib' +import Vue from 'vue' + const route = useRoute() const router = useRouter() @@ -206,10 +208,31 @@ watch([formattedData, mapMetaData, markersClusterGroupRef], () => { }) .join('') - const popupContent = `` + // const popupContent = `` const [lat, long] = primaryGeoDataValue.split(';').map(parseFloat) + const popupContent = Vue.extend(MarkerPopupContent) + .extend({ + props: { + title: { + type: String, + default: ‘No title’, + }, + description: { + type: String, + default: ‘No description’, + }, + }, + }) + .create({ + propsData: { + title: row.row[‘Title’], + description: row.row[‘Description’], + }, + }).$mount().$el + + addMarker(lat, long, row, popupContent) }) })