diff --git a/packages/frontend-core/src/components/sheet/HeaderRow.svelte b/packages/frontend-core/src/components/sheet/HeaderRow.svelte
index 54129a9b63..6b800fdf7d 100644
--- a/packages/frontend-core/src/components/sheet/HeaderRow.svelte
+++ b/packages/frontend-core/src/components/sheet/HeaderRow.svelte
@@ -2,8 +2,9 @@
import { getContext } from "svelte"
import SheetScrollWrapper from "./SheetScrollWrapper.svelte"
import HeaderCell from "./cells/HeaderCell.svelte"
+ import { Icon } from "@budibase/bbui"
- const { visibleColumns } = getContext("sheet")
+ const { visibleColumns, dispatch, config } = getContext("sheet")
+ {#if $config.allowAddColumns}
+ dispatch("add-column")}>
+
+
+ {/if}
diff --git a/packages/frontend-core/src/components/sheet/Sheet.svelte b/packages/frontend-core/src/components/sheet/Sheet.svelte
index 49f3abd18d..629496b159 100644
--- a/packages/frontend-core/src/components/sheet/Sheet.svelte
+++ b/packages/frontend-core/src/components/sheet/Sheet.svelte
@@ -26,6 +26,8 @@
export let tableId
export let allowAddRows = true
export let allowSelectRows = true
+ export let allowAddColumns = true
+ export let allowEditColumns = true
// Sheet constants
const cellHeight = 36
@@ -36,6 +38,8 @@
tableId,
allowAddRows,
allowSelectRows,
+ allowAddColumns,
+ allowEditColumns,
})
// Build up spreadsheet context
@@ -65,6 +69,8 @@
tableId,
allowAddRows,
allowSelectRows,
+ allowAddColumns,
+ allowEditColumns,
})
// Set context for children to consume
diff --git a/packages/frontend-core/src/components/sheet/cells/HeaderCell.svelte b/packages/frontend-core/src/components/sheet/cells/HeaderCell.svelte
index 108f17e0ef..064b513d20 100644
--- a/packages/frontend-core/src/components/sheet/cells/HeaderCell.svelte
+++ b/packages/frontend-core/src/components/sheet/cells/HeaderCell.svelte
@@ -7,8 +7,16 @@
export let column
export let orderable = true
- const { reorder, isReordering, isResizing, rand, sort, columns, dispatch } =
- getContext("sheet")
+ const {
+ reorder,
+ isReordering,
+ isResizing,
+ rand,
+ sort,
+ columns,
+ dispatch,
+ config,
+ } = getContext("sheet")
let anchor
let open = false
@@ -117,7 +125,9 @@
animate={false}
>