Browse Source

egg easter for geodata column works

pull/4723/head
flisowna 2 years ago
parent
commit
1332519fe7
  1. 6
      packages/nc-gui/components/smartsheet/column/EditOrAdd.vue
  2. 2
      packages/nc-gui/composables/useMapViewDataStore.ts

6
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<typeof uiTypes>(() => {
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)
? [
{

2
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) => ({

Loading…
Cancel
Save