|
|
@ -1,6 +1,7 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
import type { ColumnType } from 'nocodb-sdk' |
|
|
|
import type { ColumnType } from 'nocodb-sdk' |
|
|
|
import { isSystemColumn } from 'nocodb-sdk' |
|
|
|
import { isSystemColumn } from 'nocodb-sdk' |
|
|
|
|
|
|
|
import type { InitialGeoPositionData } from './expanded-form/index.vue' |
|
|
|
import { |
|
|
|
import { |
|
|
|
ActiveCellInj, |
|
|
|
ActiveCellInj, |
|
|
|
ColumnInj, |
|
|
|
ColumnInj, |
|
|
@ -46,7 +47,6 @@ import { |
|
|
|
useVModel, |
|
|
|
useVModel, |
|
|
|
} from '#imports' |
|
|
|
} from '#imports' |
|
|
|
import { NavigateDir } from '~/lib' |
|
|
|
import { NavigateDir } from '~/lib' |
|
|
|
import { InitialGeoPositionData } from './expanded-form/index.vue'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
interface Props { |
|
|
|
column: ColumnType |
|
|
|
column: ColumnType |
|
|
@ -131,6 +131,16 @@ const syncAndNavigate = (dir: NavigateDir, e: KeyboardEvent) => { |
|
|
|
if (!isForm.value) e.stopImmediatePropagation() |
|
|
|
if (!isForm.value) e.stopImmediatePropagation() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: probably wanna do this more generic / not column-type specific |
|
|
|
|
|
|
|
const defaultValues = computed(() => |
|
|
|
|
|
|
|
column.value.id === props.defaultGeoPosition?.geoColId |
|
|
|
|
|
|
|
? { |
|
|
|
|
|
|
|
lat: props.defaultGeoPosition?.lat, |
|
|
|
|
|
|
|
long: props.defaultGeoPosition?.long, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
: null, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
console.log('column.value in cell', column.value) |
|
|
|
console.log('column.value in cell', column.value) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
@ -146,7 +156,7 @@ console.log('column.value in cell', column.value) |
|
|
|
> |
|
|
|
> |
|
|
|
<template v-if="column"> |
|
|
|
<template v-if="column"> |
|
|
|
<LazyCellTextArea v-if="isTextArea(column)" v-model="vModel" /> |
|
|
|
<LazyCellTextArea v-if="isTextArea(column)" v-model="vModel" /> |
|
|
|
<LazyCellGeoData v-else-if="isGeoData(column)" v-model="vModel" :default-geo-position="props.defaultGeoPosition" /> |
|
|
|
<LazyCellGeoData v-else-if="isGeoData(column)" v-model="vModel" :default-values="defaultValues" /> |
|
|
|
<LazyCellCheckbox v-else-if="isBoolean(column, abstractType)" v-model="vModel" /> |
|
|
|
<LazyCellCheckbox v-else-if="isBoolean(column, abstractType)" v-model="vModel" /> |
|
|
|
<LazyCellAttachment v-else-if="isAttachment(column)" v-model="vModel" :row-index="props.rowIndex" /> |
|
|
|
<LazyCellAttachment v-else-if="isAttachment(column)" v-model="vModel" :row-index="props.rowIndex" /> |
|
|
|
<LazyCellSingleSelect v-else-if="isSingleSelect(column)" v-model="vModel" :row-index="props.rowIndex" /> |
|
|
|
<LazyCellSingleSelect v-else-if="isSingleSelect(column)" v-model="vModel" :row-index="props.rowIndex" /> |
|
|
|