From bd68672c51ce441a72dbbb93ea19b152100b7178 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 19 Feb 2021 14:05:54 +0000 Subject: [PATCH 1/2] Add field type to backend table headers --- .../components/backend/DataTable/Table.svelte | 9 ++++ .../DataTable/TableHeader/TableHeader.svelte | 44 +++++++++++++------ 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index 195876cf05..fa04829634 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -301,4 +301,13 @@ padding-top: var(--spacing-xs); padding-bottom: var(--spacing-xs); } + + :global(.ag-header) { + height: 61px !important; + min-height: 61px !important; + } + + :global(.ag-header-row) { + height: 60px !important; + } diff --git a/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte b/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte index 2d65010a62..5c20b999fa 100644 --- a/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte +++ b/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte @@ -2,6 +2,7 @@ import { onMount, onDestroy } from "svelte" import { Modal, ModalContent } from "@budibase/bbui" import CreateEditColumn from "../modals/CreateEditColumn.svelte" + import { FIELDS } from "constants/backend" const SORT_ICON_MAP = { asc: "ri-arrow-down-fill", @@ -51,6 +52,8 @@ column.removeEventListener("sortChanged", setSort) column.removeEventListener("filterActiveChanged", setFilterActive) }) + + $: type = FIELDS[field.type.toUpperCase()]?.name
(hovered = true)} on:mouseleave={() => (hovered = false)}> -
-
- {#if field.autocolumn}{/if} - {displayName} +
+ {#if field.autocolumn}{/if} +
+
{displayName}
+ {#if type} +
{type}
+ {/if}
- +
Date: Fri, 19 Feb 2021 14:06:08 +0000 Subject: [PATCH 2/2] Fix crash when viewing views without schemas --- .../components/backend/DataTable/TableHeader/TableHeader.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte b/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte index 5c20b999fa..a93222b4f9 100644 --- a/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte +++ b/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte @@ -53,7 +53,7 @@ column.removeEventListener("filterActiveChanged", setFilterActive) }) - $: type = FIELDS[field.type.toUpperCase()]?.name + $: type = FIELDS[field?.type?.toUpperCase()]?.name