diff --git a/packages/nc-gui/components/dlg/AirtableImport.vue b/packages/nc-gui/components/dlg/AirtableImport.vue
index ef1fdd8fd6..d33078bf37 100644
--- a/packages/nc-gui/components/dlg/AirtableImport.vue
+++ b/packages/nc-gui/components/dlg/AirtableImport.vue
@@ -54,7 +54,7 @@ const syncSource = ref({
syncLookup: true,
syncFormula: false,
syncAttachment: true,
- syncUsers: true,
+ syncUsers: false,
},
},
})
@@ -210,7 +210,7 @@ async function loadSyncSrc() {
syncLookup: true,
syncFormula: false,
syncAttachment: true,
- syncUsers: true,
+ syncUsers: false,
},
},
}
@@ -403,22 +403,30 @@ function downloadLogs(filename: string) {
-
+
-
- {{ $t('labels.importUsers') }}
-
+
+
+ {{ $t('title.comingSoon') }}
+
+
+ {{ $t('labels.importFormulaColumns') }}
+
+
-
-
-
- {{ $t('title.comingSoon') }}
-
-
- {{ $t('labels.importFormulaColumns') }}
-
-
+
diff --git a/packages/nc-gui/components/smartsheet/grid/Table.vue b/packages/nc-gui/components/smartsheet/grid/Table.vue
index 70bc84c7d2..3371fb33c3 100644
--- a/packages/nc-gui/components/smartsheet/grid/Table.vue
+++ b/packages/nc-gui/components/smartsheet/grid/Table.vue
@@ -234,6 +234,9 @@ const isKeyDown = ref(false)
async function clearCell(ctx: { row: number; col: number } | null, skipUpdate = false) {
if (!ctx || !hasEditPermission.value || (!isLinksOrLTAR(fields.value[ctx.col]) && isVirtualCol(fields.value[ctx.col]))) return
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
+ if (colMeta.value[ctx.col].isReadonly) return
+
const rowObj = dataRef.value[ctx.row]
const columnObj = fields.value[ctx.col]
@@ -424,15 +427,23 @@ const cellMeta = computed(() => {
})
})
+const isReadonly = (col: ColumnType) => {
+ return (
+ isSystemColumn(col) ||
+ isLookup(col) ||
+ isRollup(col) ||
+ isFormula(col) ||
+ isVirtualCol(col) ||
+ isCreatedOrLastModifiedTimeCol(col) ||
+ isCreatedOrLastModifiedByCol(col)
+ )
+}
+
const colMeta = computed(() => {
return fields.value.map((col) => {
return {
- isLookup: isLookup(col),
- isRollup: isRollup(col),
- isFormula: isFormula(col),
- isCreatedOrLastModifiedTimeCol: isCreatedOrLastModifiedTimeCol(col),
- isCreatedOrLastModifiedByCol: isCreatedOrLastModifiedByCol(col),
isVirtualCol: isVirtualCol(col),
+ isReadonly: isReadonly(col),
}
})
})
@@ -932,6 +943,9 @@ async function clearSelectedRangeOfCells() {
continue
}
+ // skip readonly columns
+ if (isReadonly(col)) continue
+
row.row[col.title] = null
props.push(col.title)
}
@@ -1251,6 +1265,16 @@ const refreshFillHandle = () => {
})
}
+const selectedReadonly = computed(
+ () =>
+ // if all the selected columns are not readonly
+ (selectedRange.isEmpty() && activeCell.col && colMeta.value[activeCell.col].isReadonly) ||
+ (!selectedRange.isEmpty() &&
+ Array.from({ length: selectedRange.end.col - selectedRange.start.col + 1 }).every(
+ (_, i) => colMeta.value[selectedRange.start.col + i].isReadonly,
+ )),
+)
+
const showFillHandle = computed(
() =>
!readOnly.value &&
@@ -1259,16 +1283,10 @@ const showFillHandle = computed(
!dataRef.value[(isNaN(selectedRange.end.row) ? activeCell.row : selectedRange.end.row) ?? -1]?.rowMeta?.new &&
activeCell.col !== null &&
fields.value[activeCell.col] &&
- !(
- isLookup(fields.value[activeCell.col]) ||
- isRollup(fields.value[activeCell.col]) ||
- isFormula(fields.value[activeCell.col]) ||
- isCreatedOrLastModifiedTimeCol(fields.value[activeCell.col]) ||
- isCreatedOrLastModifiedByCol(fields.value[activeCell.col])
- ) &&
!isViewDataLoading.value &&
!isPaginationLoading.value &&
- dataRef.value.length,
+ dataRef.value.length &&
+ !selectedReadonly.value,
)
watch(
@@ -1660,7 +1678,7 @@ onKeyStroke('ArrowDown', onDown)
|
-
+
|
-
+