π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
prevent overridden v3 column options
Fendy Heryanto7da396b9f647
diff --git a/packages/nocodb/src/utils/api-v3-data-transformation.builder.ts b/packages/nocodb/src/utils/api-v3-data-transformation.builder.tsindex c2cb3bc146..90719adbde 100644--- a/packages/nocodb/src/utils/api-v3-data-transformation.builder.ts+++ b/packages/nocodb/src/utils/api-v3-data-transformation.builder.ts@@ -646,16 +646,19 @@ export const columnV3ToV2Builder = builderGenerator<FieldV3Type, ColumnType>({case UITypes.SingleSelect:case UITypes.MultiSelect:{- const choices =- meta.choices?.map((opt) => {- const res: Record<string, unknown> = {- title: opt.title,- color: opt.color,- };- if (opt.id) res.id = opt.id;- return res;- }) ?? [];- colOptions = { options: choices };+ // when choices not sent, do not override+ if (meta.choices) {+ const choices =+ meta.choices?.map((opt) => {+ const res: Record<string, unknown> = {+ title: opt.title,+ color: opt.color,+ };+ if (opt.id) res.id = opt.id;+ return res;+ }) ?? [];+ colOptions = { options: choices };+ }}break;