From 2d52eff96f57255460a1f7d38ba221dc9a7db7b2 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 2 Sep 2024 08:47:15 +0100 Subject: [PATCH] Update button column to account for ability to add rows --- .../grid/layout/ButtonColumn.svelte | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/packages/frontend-core/src/components/grid/layout/ButtonColumn.svelte b/packages/frontend-core/src/components/grid/layout/ButtonColumn.svelte index 8851b8ff1c..bb8dd30b93 100644 --- a/packages/frontend-core/src/components/grid/layout/ButtonColumn.svelte +++ b/packages/frontend-core/src/components/grid/layout/ButtonColumn.svelte @@ -20,6 +20,7 @@ showVScrollbar, showHScrollbar, dispatch, + config, } = getContext("grid") let container @@ -103,17 +104,21 @@ {/each} -
($hoveredRowId = BlankRowID)} - on:mouseleave={$isDragging ? null : () => ($hoveredRowId = null)} - > - dispatch("add-row-inline")} - /> -
+ {#if $config.canAddRows} +
($hoveredRowId = BlankRowID)} + on:mouseleave={$isDragging ? null : () => ($hoveredRowId = null)} + > + dispatch("add-row-inline")} + /> +
+ {/if}