From dc5ae370f4a957cd33bf439143b5a519e944970f Mon Sep 17 00:00:00 2001 From: Khisby Al Ghofari Date: Wed, 12 Apr 2023 13:10:42 +0700 Subject: [PATCH] feat: add check all on action column editor import modal --- packages/nc-gui/components/template/Editor.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/nc-gui/components/template/Editor.vue b/packages/nc-gui/components/template/Editor.vue index 214ce1da20..4de89e1090 100644 --- a/packages/nc-gui/components/template/Editor.vue +++ b/packages/nc-gui/components/template/Editor.vue @@ -87,6 +87,8 @@ const isImporting = ref(false) const importingTips = ref>({}) +const checkAllRecord = ref(false) + const uiTypeOptions = ref( (Object.keys(UITypes) as (keyof typeof UITypes)[]) .filter( @@ -615,6 +617,13 @@ function handleEditableTnChange(idx: number) { function isSelectDisabled(uidt: string, disableSelect = false) { return (uidt === UITypes.SingleSelect || uidt === UITypes.MultiSelect) && disableSelect } + +function handleCheckAllRecord(event, table_name){ + const isChecked = event.target.checked; + for (const record of srcDestMapping.value[table_name]) { + record.enabled = isChecked; + } +}