diff --git a/packages/nc-gui-v2/components/smartsheet/Cell.vue b/packages/nc-gui-v2/components/smartsheet/Cell.vue index 7363f88eb4..6c271fe9ef 100644 --- a/packages/nc-gui-v2/components/smartsheet/Cell.vue +++ b/packages/nc-gui-v2/components/smartsheet/Cell.vue @@ -10,6 +10,7 @@ interface Props { editEnabled: boolean rowIndex?: number active?: boolean + virtual?: boolean } const props = defineProps() @@ -20,6 +21,8 @@ const column = toRef(props, 'column') const active = toRef(props, 'active', false) +const virtual = toRef(props, 'virtual', false) + provide(ColumnInj, column) provide(EditModeInj, useVModel(props, 'editEnabled', emit)) @@ -54,10 +57,6 @@ const isManualSaved = $computed(() => { return [UITypes.Currency, UITypes.Duration].includes(column?.value?.uidt as UITypes) }) -const isPrimary = computed(() => { - return column?.value?.pv -}) - const vModel = computed({ get: () => props.modelValue, set: (val) => { @@ -75,6 +74,7 @@ const vModel = computed({ }) const { + isPrimary, isURL, isEmail, isJSON, @@ -112,7 +112,7 @@ const syncAndNavigate = (dir: NavigateDir) => { diff --git a/packages/nc-gui-v2/composables/useColumn.ts b/packages/nc-gui-v2/composables/useColumn.ts index 47baba15ec..217b836592 100644 --- a/packages/nc-gui-v2/composables/useColumn.ts +++ b/packages/nc-gui-v2/composables/useColumn.ts @@ -56,10 +56,14 @@ export function useColumn(column: Ref) { const isManualSaved = computed(() => [UITypes.Currency, UITypes.Year, UITypes.Time, UITypes.Duration].includes(uiDatatype.value), ) + const isPrimary = computed(() => { + return column?.value?.pv + }) return { abstractType, dataTypeLow, + isPrimary, isBoolean, isString, isTextArea,