From 810e7e7709a914c3b070d7bc8278fff1a8917458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D5=A1=C9=A8=D5=BC=C9=A2=D3=84=D5=A1=D6=85=D5=BC=C9=A2?= Date: Fri, 17 Nov 2023 19:33:04 +0800 Subject: [PATCH] feat(nc-gui): update column_name in Editor --- packages/nc-gui/components/template/Editor.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/nc-gui/components/template/Editor.vue b/packages/nc-gui/components/template/Editor.vue index 1c59e4218e..8759b048fa 100644 --- a/packages/nc-gui/components/template/Editor.vue +++ b/packages/nc-gui/components/template/Editor.vue @@ -535,6 +535,13 @@ async function importTemplate() { title: '', columns: table.columns || [], }) + + // column_name could have been updated in tableCreate + // e.g. sanitize column name to something like field_1, field_2, and etc + createdTable.columns.forEach((column, i) => { + table.columns[i].column_name = column.column_name + }) + table.id = createdTable.id table.title = createdTable.title