diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index aac73e6e6e..f40462a8a8 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -9,7 +9,7 @@ import CreateEditRow from "./modals/CreateEditRow.svelte" import CreateEditUser from "./modals/CreateEditUser.svelte" import CreateEditColumn from "./modals/CreateEditColumn.svelte" - import { TableNames, UNEDITABLE_USER_FIELDS } from "constants" + import { TableNames, UNEDITABLE_USER_FIELDS, BUDIBASE_INTERNAL_DB } from "constants" import RoleCell from "./cells/RoleCell.svelte" export let schema = {} @@ -28,6 +28,7 @@ let editColumnModal let customRenderers = [] + $: isInternal = tableId === BUDIBASE_INTERNAL_DB $: isUsersTable = tableId === TableNames.USERS $: data && resetSelectedRows() $: editRowComponent = isUsersTable ? CreateEditUser : CreateEditRow @@ -124,7 +125,7 @@ bind:selectedRows allowSelectRows={allowEditing && !isUsersTable} allowEditRows={allowEditing} - allowEditColumns={allowEditing} + allowEditColumns={allowEditing && isInternal} showAutoColumns={!hideAutocolumns} on:editcolumn={e => editColumn(e.detail)} on:editrow={e => editRow(e.detail)} diff --git a/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte index cdf02d8eb4..9ba474eacb 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte @@ -15,7 +15,7 @@ $params.selectedDatasource !== BUDIBASE_INTERNAL_DB function selectFirstDatasource({ detail }) { - $goto("./datasource") + $goto("./table") } @@ -27,7 +27,7 @@