From e0e0fcabad9b3695927af3e4d0b50203ed4146fa Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 4 Jul 2023 09:41:10 +0100 Subject: [PATCH] Fix grid block row height not working. Change initialRowHeight setting to fixedRowHeight --- packages/client/manifest.json | 2 +- packages/client/src/components/app/GridBlock.svelte | 4 ++-- .../src/components/grid/controls/SizeButton.svelte | 10 ++++++---- .../src/components/grid/layout/Grid.svelte | 4 ++-- .../src/components/grid/stores/config.js | 4 ++-- .../frontend-core/src/components/grid/stores/ui.js | 12 +++++++----- 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 59928ae684..649038c20e 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -5274,7 +5274,7 @@ { "type": "select", "label": "Row height", - "key": "initialRowHeight", + "key": "fixedRowHeight", "placeholder": "Default", "options": [ { diff --git a/packages/client/src/components/app/GridBlock.svelte b/packages/client/src/components/app/GridBlock.svelte index ae0acb50f0..dd67a5657b 100644 --- a/packages/client/src/components/app/GridBlock.svelte +++ b/packages/client/src/components/app/GridBlock.svelte @@ -12,7 +12,7 @@ export let initialFilter = null export let initialSortColumn = null export let initialSortOrder = null - export let initialRowHeight = null + export let fixedRowHeight = null export let columns = null const component = getContext("component") @@ -47,7 +47,7 @@ {initialFilter} {initialSortColumn} {initialSortOrder} - {initialRowHeight} + {fixedRowHeight} {columnWhitelist} {schemaOverrides} showControls={false} diff --git a/packages/frontend-core/src/components/grid/controls/SizeButton.svelte b/packages/frontend-core/src/components/grid/controls/SizeButton.svelte index eb9bf917d9..22e0c6c2e9 100644 --- a/packages/frontend-core/src/components/grid/controls/SizeButton.svelte +++ b/packages/frontend-core/src/components/grid/controls/SizeButton.svelte @@ -8,7 +8,8 @@ SmallRowHeight, } from "../lib/constants" - const { stickyColumn, columns, rowHeight, table } = getContext("grid") + const { stickyColumn, columns, rowHeight, table, fixedRowHeight } = + getContext("grid") // Some constants for column width options const smallColSize = 120 @@ -86,6 +87,7 @@
{#each rowSizeOptions as option} changeRowHeight(option.size)} @@ -118,15 +120,15 @@