From 933545ccf7481af13350cc0fe03eaf96a538c223 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 28 Apr 2023 11:37:38 +0100 Subject: [PATCH] Hide add column icon when disable column addition flag is set --- .../components/grid/layout/HeaderRow.svelte | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/packages/frontend-core/src/components/grid/layout/HeaderRow.svelte b/packages/frontend-core/src/components/grid/layout/HeaderRow.svelte index 2ec186a4d6..0eaabdef7f 100644 --- a/packages/frontend-core/src/components/grid/layout/HeaderRow.svelte +++ b/packages/frontend-core/src/components/grid/layout/HeaderRow.svelte @@ -4,8 +4,14 @@ import HeaderCell from "../cells/HeaderCell.svelte" import { Icon } from "@budibase/bbui" - const { renderedColumns, dispatch, scroll, hiddenColumnsWidth, width } = - getContext("grid") + const { + renderedColumns, + dispatch, + scroll, + hiddenColumnsWidth, + width, + config, + } = getContext("grid") $: columnsWidth = $renderedColumns.reduce( (total, col) => (total += col.width), @@ -23,13 +29,15 @@ {/each} -
dispatch("add-column")} - > - -
+ {#if $config.allowAddColumns} +
dispatch("add-column")} + > + +
+ {/if}