diff --git a/packages/frontend-core/src/components/grid/controls/ColumnWidthButton.svelte b/packages/frontend-core/src/components/grid/controls/ColumnWidthButton.svelte new file mode 100644 index 0000000000..c799bd4602 --- /dev/null +++ b/packages/frontend-core/src/components/grid/controls/ColumnWidthButton.svelte @@ -0,0 +1,89 @@ + + +
+ (open = !open)} + selected={open} + > + Column width + +
+ + +
+ {#each sizeOptions as option} + changeColumnWidth(option.size)} + selected={option.selected} + > + {option.label} + + {/each} + {#if custom} + Custom + {/if} +
+
+ + diff --git a/packages/frontend-core/src/components/grid/layout/Grid.svelte b/packages/frontend-core/src/components/grid/layout/Grid.svelte index e6f9baa33f..97b4b302bb 100644 --- a/packages/frontend-core/src/components/grid/layout/Grid.svelte +++ b/packages/frontend-core/src/components/grid/layout/Grid.svelte @@ -22,6 +22,7 @@ import HideColumnsButton from "../controls/HideColumnsButton.svelte" import AddRowButton from "../controls/AddRowButton.svelte" import RowHeightButton from "../controls/RowHeightButton.svelte" + import ColumnWidthButton from "../controls/ColumnWidthButton.svelte" import NewRowTop from "./NewRowTop.svelte" import { MaxCellRenderHeight, @@ -29,7 +30,6 @@ GutterWidth, DefaultRowHeight, } from "../lib/constants" - import NewRowBottom from "./NewRowBottom.svelte" export let API = null export let tableId = null @@ -112,6 +112,7 @@ + diff --git a/packages/frontend-core/src/components/grid/lib/events.js b/packages/frontend-core/src/components/grid/lib/events.js index 950ed70332..1c486858b2 100644 --- a/packages/frontend-core/src/components/grid/lib/events.js +++ b/packages/frontend-core/src/components/grid/lib/events.js @@ -21,10 +21,7 @@ export const createEventManagers = () => { // Return unsubscribe function return () => { - console.log("unsub", event) - console.log(subscribers[event].length) subscribers[event] = subscribers[event].filter(cb => cb !== callback) - console.log(subscribers[event].length) } }