diff --git a/packages/nc-gui/components/template/Editor.vue b/packages/nc-gui/components/template/Editor.vue index 214ce1da20..455611e3a7 100644 --- a/packages/nc-gui/components/template/Editor.vue +++ b/packages/nc-gui/components/template/Editor.vue @@ -3,6 +3,7 @@ import dayjs from 'dayjs' import utc from 'dayjs/plugin/utc' import type { ColumnType, TableType } from 'nocodb-sdk' import { UITypes, isSystemColumn, isVirtualCol } from 'nocodb-sdk' +import type { CheckboxChangeEvent } from 'ant-design-vue/es/checkbox/interface' import { srcDestMappingColumns, tableColumns } from './utils' import { Empty, @@ -87,6 +88,8 @@ const isImporting = ref(false) const importingTips = ref>({}) +const checkAllRecord = ref([]) + const uiTypeOptions = ref( (Object.keys(UITypes) as (keyof typeof UITypes)[]) .filter( @@ -615,6 +618,13 @@ function handleEditableTnChange(idx: number) { function isSelectDisabled(uidt: string, disableSelect = false) { return (uidt === UITypes.SingleSelect || uidt === UITypes.MultiSelect) && disableSelect } + +function handleCheckAllRecord(event: CheckboxChangeEvent, tableName: string) { + const isChecked = event.target.checked + for (const record of srcDestMapping.value[tableName]) { + record.enabled = isChecked + } +}