From 996c3d50bd3bf0aa449b1f7c2fbec334e206915b Mon Sep 17 00:00:00 2001 From: Abigail Alexander Date: Thu, 22 Oct 2026 11:39:06 +0100 Subject: [PATCH 1/2] Fix drag and resize staying disabled if editable=false initially --- package-lock.json | 2 +- package.json | 2 +- src/ui/widgets/DisplayReactGridLayout/displayGridLayout.tsx | 4 ++-- src/ui/widgets/DisplayReactGridLayout/displayResponsive.tsx | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c5ccf0e..61159e36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@diamondlightsource/cs-web-lib", - "version": "0.11.2", + "version": "0.11.3", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index e6786636..bfb404f3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@diamondlightsource/cs-web-lib", "type": "module", - "version": "0.11.2", + "version": "0.11.3", "description": "Control system web library", "main": "./dist/index.cjs", "scripts": { diff --git a/src/ui/widgets/DisplayReactGridLayout/displayGridLayout.tsx b/src/ui/widgets/DisplayReactGridLayout/displayGridLayout.tsx index 3ee020b0..9a088747 100644 --- a/src/ui/widgets/DisplayReactGridLayout/displayGridLayout.tsx +++ b/src/ui/widgets/DisplayReactGridLayout/displayGridLayout.tsx @@ -230,8 +230,8 @@ export const DisplayGridLayoutComponent = ( gridLayoutColumns: columns, gridCellMargins: cellMargins, gridCellHeight: cellHeight, - gridCellDragEnabled, - gridCellResizeEnabled + gridCellDragEnabled: props.gridCellDragEnabled ?? true, + gridCellResizeEnabled: props.gridCellResizeEnabled ?? true }) ); }, [ diff --git a/src/ui/widgets/DisplayReactGridLayout/displayResponsive.tsx b/src/ui/widgets/DisplayReactGridLayout/displayResponsive.tsx index 838862e9..5af839a7 100644 --- a/src/ui/widgets/DisplayReactGridLayout/displayResponsive.tsx +++ b/src/ui/widgets/DisplayReactGridLayout/displayResponsive.tsx @@ -252,8 +252,8 @@ export const DisplayResponsiveComponent = (props: propsType): JSX.Element => { cellMargins, cellHeight, dispatch, - gridCellDragEnabled, - gridCellResizeEnabled + newProps.gridCellDragEnabled ?? true, + newProps.gridCellResizeEnabled ?? true ), [ dispatch, From 60709bbdc4aa9d6579e04f3504028c77e0d976a0 Mon Sep 17 00:00:00 2001 From: Abigail Alexander Date: Thu, 22 Oct 2026 11:46:25 +0100 Subject: [PATCH 2/2] Fix linting --- src/ui/widgets/DisplayReactGridLayout/displayGridLayout.tsx | 4 ++-- src/ui/widgets/DisplayReactGridLayout/displayResponsive.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/widgets/DisplayReactGridLayout/displayGridLayout.tsx b/src/ui/widgets/DisplayReactGridLayout/displayGridLayout.tsx index 9a088747..459b794a 100644 --- a/src/ui/widgets/DisplayReactGridLayout/displayGridLayout.tsx +++ b/src/ui/widgets/DisplayReactGridLayout/displayGridLayout.tsx @@ -244,8 +244,8 @@ export const DisplayGridLayoutComponent = ( displayWidth, cellMargins, cellHeight, - gridCellDragEnabled, - gridCellResizeEnabled + props.gridCellDragEnabled, + props.gridCellResizeEnabled ]); const { diff --git a/src/ui/widgets/DisplayReactGridLayout/displayResponsive.tsx b/src/ui/widgets/DisplayReactGridLayout/displayResponsive.tsx index 5af839a7..570c9b35 100644 --- a/src/ui/widgets/DisplayReactGridLayout/displayResponsive.tsx +++ b/src/ui/widgets/DisplayReactGridLayout/displayResponsive.tsx @@ -265,8 +265,8 @@ export const DisplayResponsiveComponent = (props: propsType): JSX.Element => { breakpoints, cellMargins, cellHeight, - gridCellDragEnabled, - gridCellResizeEnabled, + newProps.gridCellDragEnabled, + newProps.gridCellResizeEnabled, areBreakpointsConsistent ] );