diff --git a/lerna.json b/lerna.json index 75945feb69..bf193f9a81 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.8.14", + "version": "0.8.16", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/builder/package.json b/packages/builder/package.json index c8b1b493ac..6354a90ee9 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.8.14", + "version": "0.8.16", "license": "AGPL-3.0", "private": true, "scripts": { @@ -65,9 +65,9 @@ }, "dependencies": { "@budibase/bbui": "^1.58.13", - "@budibase/client": "^0.8.14", + "@budibase/client": "^0.8.16", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.8.14", + "@budibase/string-templates": "^0.8.16", "@budibase/svelte-ag-grid": "^1.0.4", "@sentry/browser": "5.19.1", "@svelteschool/svelte-forms": "0.7.0", diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 055a0a693b..2b0812bb1b 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -53,10 +53,13 @@ $: required = !!field?.constraints?.presence || primaryDisplay $: uneditable = $tables.selected?._id === TableNames.USERS && - UNEDITABLE_USER_FIELDS.includes(field.name) + UNEDITABLE_USER_FIELDS.includes(field.name) || + (originalName && field.type === LINK_TYPE) $: invalid = (field.type === LINK_TYPE && !field.tableId) || - Object.keys($tables.draft.schema).some(key => key === field.name) + Object.keys($tables.draft.schema).some( + key => key === field.name && key !== originalName + ) // used to select what different options can be displayed for column type $: canBeSearched = @@ -154,19 +157,22 @@ if (!linkTable) { return null } - const thisName = truncate(table.name, { length: 15 }), - linkName = truncate(linkTable.name, { length: 15 }) + const thisName = truncate(table.name, { length: 14 }), + linkName = truncate(linkTable.name, { length: 14 }) return [ { name: `Many ${thisName} rows → many ${linkName} rows`, + alt: `Many ${table.name} rows → many ${linkTable.name} rows`, value: RelationshipTypes.MANY_TO_MANY, }, { name: `One ${linkName} row → many ${thisName} rows`, + alt: `One ${linkTable.name} rows → many ${table.name} rows`, value: RelationshipTypes.ONE_TO_MANY, }, { name: `One ${thisName} row → many ${linkName} rows`, + alt: `One ${table.name} rows → many ${linkTable.name} rows`, value: RelationshipTypes.MANY_TO_ONE, }, ] @@ -259,13 +265,13 @@