Browse Source

geodata: move info about record limits depending on the size of data into map view - add missing syncCall for pagination data (WIP)

pull/4723/head
flisowna 2 years ago
parent
commit
a2316f9080
  1. 1
      packages/nc-gui/components/smartsheet/Map.vue
  2. 24
      packages/nc-gui/components/smartsheet/toolbar/MapRowsLimits.vue

1
packages/nc-gui/components/smartsheet/Map.vue

@ -180,6 +180,7 @@ watch([formattedData, mapMetaData, markersClusterGroupRef], () => {
addMarker(lat, long, row) addMarker(lat, long, row)
}) })
syncCount()
}) })
watch(view, async (nextView) => { watch(view, async (nextView) => {

24
packages/nc-gui/components/smartsheet/toolbar/MapRowsLimits.vue

@ -1,24 +0,0 @@
<script setup lang="ts">
const { syncCount, paginationData } = useMapViewStoreOrThrow()
const count = computed(() => {
return paginationData.value.totalRows
})
syncCount()
</script>
<template>
<a-tooltip placement="bottom">
<template #title>
<span v-if="count > 1000"> You're over the limit. </span>
<span v-else> You're getting close to the limit. </span>
<span> The limit of markers shown in a Map View is 1000 records. </span>
</template>
<div v-if="count > 900" class="nc-warning-info flex min-w-32px h-32px items-center gap-1 px-2">
<div>{{ count }} records</div>
<mdi-map-marker-alert />
</div>
</a-tooltip>
</template>
Loading…
Cancel
Save