From bc340ba5c606aa21862abc0eae71e967bb41610b Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Sun, 17 Oct 2021 20:58:06 +0100 Subject: [PATCH] remove addition of _id and _rev as autocolumns --- packages/bbui/src/Table/CellRenderer.svelte | 2 -- .../backend/DataTable/DataTable.svelte | 21 +------------------ 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/packages/bbui/src/Table/CellRenderer.svelte b/packages/bbui/src/Table/CellRenderer.svelte index 1c3822e51e..11deaa8318 100644 --- a/packages/bbui/src/Table/CellRenderer.svelte +++ b/packages/bbui/src/Table/CellRenderer.svelte @@ -5,7 +5,6 @@ import RelationshipRenderer from "./RelationshipRenderer.svelte" import AttachmentRenderer from "./AttachmentRenderer.svelte" import ArrayRenderer from "./ArrayRenderer.svelte" - import InternalRenderer from "./InternalRenderer.svelte" export let row export let schema @@ -23,7 +22,6 @@ number: StringRenderer, longform: StringRenderer, array: ArrayRenderer, - internal: InternalRenderer, } $: type = schema?.type ?? "string" diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index f1d23e8f3d..11bf1ee739 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -16,29 +16,10 @@ import { Pagination } from "@budibase/bbui" let hideAutocolumns = true - let schema $: isUsersTable = $tables.selected?._id === TableNames.USERS $: type = $tables.selected?.type $: isInternal = type !== "external" - $: { - schema = $tables.selected?.schema - - // Manually add these as we don't want them to be 'real' auto-columns - schema._id = { - type: "internal", - editable: false, - displayName: "ID", - autocolumn: true, - } - if (isInternal) { - schema._rev = { - type: "internal", - editable: false, - displayName: "Revision", - autocolumn: true, - } - } - } + $: schema = $tables.selected?.schema $: id = $tables.selected?._id $: search = searchTable(id) $: columnOptions = Object.keys($search.schema || {})