Browse Source

WIP popupcontent adjustments

pull/5248/head
flisowna 2 years ago
parent
commit
87f6363d74
  1. 25
      packages/nc-gui/components/smartsheet/Map.vue

25
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 = `<ul class="popup-content">${listItems}</ul>`
// const popupContent = `<ul class="popup-content">${listItems}</ul>`
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)
})
})

Loading…
Cancel
Save