From cc12c0c3b80571ea25661f2cbd28bb2fa6442e02 Mon Sep 17 00:00:00 2001 From: Hein Date: Wed, 11 Feb 2026 15:11:13 +0200 Subject: [PATCH] fix(Gridler): improve height and width fallback logic --- src/Gridler/GridlerDataGrid.tsx | 4 ++-- src/Gridler/components/Computer.tsx | 1 + .../components/adaptors/GlidlerAPIAdaptorForGoLangv2.tsx | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Gridler/GridlerDataGrid.tsx b/src/Gridler/GridlerDataGrid.tsx index 9faa286..4004433 100644 --- a/src/Gridler/GridlerDataGrid.tsx +++ b/src/Gridler/GridlerDataGrid.tsx @@ -166,7 +166,7 @@ export const GridlerDataGrid = () => { columns={(renderColumns as Array) ?? []} columnSelect="none" drawFocusRing - height={height ?? 400} + height={height || 400} overscrollX={16} overscrollY={32} rangeSelect={allowMultiSelect ? 'multi-rect' : 'cell'} @@ -284,7 +284,7 @@ export const GridlerDataGrid = () => { rows={total_rows ?? 0} theme={theme.gridTheme} - width={width ?? 200} + width={width || 200} /> )} diff --git a/src/Gridler/components/Computer.tsx b/src/Gridler/components/Computer.tsx index 97f5a91..6c58c77 100644 --- a/src/Gridler/components/Computer.tsx +++ b/src/Gridler/components/Computer.tsx @@ -244,6 +244,7 @@ export const Computer = React.memo(() => { return; } if (refFirstRun.current > 0) { + getState('refreshCells')?.(); return; } refFirstRun.current = 1; diff --git a/src/Gridler/components/adaptors/GlidlerAPIAdaptorForGoLangv2.tsx b/src/Gridler/components/adaptors/GlidlerAPIAdaptorForGoLangv2.tsx index 772c9c7..3eb966e 100644 --- a/src/Gridler/components/adaptors/GlidlerAPIAdaptorForGoLangv2.tsx +++ b/src/Gridler/components/adaptors/GlidlerAPIAdaptorForGoLangv2.tsx @@ -267,7 +267,7 @@ function _GlidlerAPIAdaptorForGoLangv2(props: GlidlerAPIAdaptorForG } return []; }, - [props.url, props.authtoken, props.filter, props.options, getState, addError] + [props.url, props.authtoken, props.filter, JSON.stringify(props.options), getState, addError] ); //Reset the function in the store.