From 7311bf87055e253ad3f22bd5ea1c5fa876556bfe Mon Sep 17 00:00:00 2001 From: mertmit Date: Fri, 6 May 2022 20:18:03 +0300 Subject: [PATCH] fix: single/multi select options at creation Signed-off-by: mertmit --- packages/nocodb/src/lib/noco/meta/api/columnApis.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/lib/noco/meta/api/columnApis.ts b/packages/nocodb/src/lib/noco/meta/api/columnApis.ts index 180b5df871..26d373334b 100644 --- a/packages/nocodb/src/lib/noco/meta/api/columnApis.ts +++ b/packages/nocodb/src/lib/noco/meta/api/columnApis.ts @@ -493,7 +493,11 @@ export async function columnAdd(req: Request, res: Response) { }> = (await sqlClient.columnList({ tn: table.table_name }))?.data?.list; const insertedColumnMeta = - columns.find(c => c.cn === colBody.column_name) || {}; + columns.find(c => c.cn === colBody.column_name) || {} as any; + + if (colBody.uidt === UITypes.SingleSelect || colBody.uidt === UITypes.MultiSelect) { + insertedColumnMeta.dtxp = colBody.dtxp; + } await Column.insert({ ...colBody,