diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte index bf8bff1292..21bed847f5 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsSection.svelte @@ -147,8 +147,8 @@ options: setting.options || [], // Number fields - min: setting.min || null, - max: setting.max || null, + min: setting.min ?? null, + max: setting.max ?? null, }} {bindings} {componentBindings} diff --git a/packages/server/src/api/controllers/table/utils.ts b/packages/server/src/api/controllers/table/utils.ts index 162df3754c..bbccde467b 100644 --- a/packages/server/src/api/controllers/table/utils.ts +++ b/packages/server/src/api/controllers/table/utils.ts @@ -104,7 +104,6 @@ export function importToRows(data: any, table: any, user: any = {}) { const processed: any = inputProcessing(user, table, row, { noAutoRelationships: true, }) - table = processed.table row = processed.row let fieldName: any @@ -113,6 +112,7 @@ export function importToRows(data: any, table: any, user: any = {}) { // check whether the options need to be updated for inclusion as part of the data import if ( schema.type === FieldTypes.OPTIONS && + row[fieldName] && (!schema.constraints.inclusion || schema.constraints.inclusion.indexOf(row[fieldName]) === -1) ) { @@ -120,6 +120,7 @@ export function importToRows(data: any, table: any, user: any = {}) { ...schema.constraints.inclusion, row[fieldName], ] + schema.constraints.inclusion.sort() } }