From 1332519fe7eb334b47326da0eefa0b326d4e2a29 Mon Sep 17 00:00:00 2001 From: flisowna Date: Tue, 20 Dec 2022 14:19:28 +0300 Subject: [PATCH] egg easter for geodata column works --- packages/nc-gui/components/smartsheet/column/EditOrAdd.vue | 6 +++++- packages/nc-gui/composables/useMapViewDataStore.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue index 7ead5c523d..1745405464 100644 --- a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue +++ b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue @@ -52,9 +52,13 @@ const columnToValidate = [UITypes.Email, UITypes.URL, UITypes.PhoneNumber] const onlyNameUpdateOnEditColumns = [UITypes.LinkToAnotherRecord, UITypes.Lookup, UITypes.Rollup] +const geoDataToggleCondition = (t) => { + return geodataToggleState.show ? geodataToggleState.show : !t.name.includes(UITypes.GeoData) +} + const uiTypesOptions = computed(() => { return [ - ...uiTypes.filter((t) => !isEdit.value || !t.virtual), + ...uiTypes.filter((t) => geoDataToggleCondition(t) && (!isEdit.value || !t.virtual)), ...(!isEdit.value && meta?.value?.columns?.every((c) => !c.pk) ? [ { diff --git a/packages/nc-gui/composables/useMapViewDataStore.ts b/packages/nc-gui/composables/useMapViewDataStore.ts index 33db9ba331..167f859b1e 100644 --- a/packages/nc-gui/composables/useMapViewDataStore.ts +++ b/packages/nc-gui/composables/useMapViewDataStore.ts @@ -4,7 +4,7 @@ import type { ColumnType, MapType, TableType, ViewType } from 'nocodb-sdk' import { ref, useInjectionState, useMetas } from '#imports' import type { Row } from '~/lib' -export const geodataToggleState = reactive({ show: true }) +export const geodataToggleState = reactive({ show: false }) const formatData = (list: Row[]) => list.map((row) => ({