From 12b38d1b7a38336dab26164d0ec5736069c3fd08 Mon Sep 17 00:00:00 2001 From: Oscar Kilhed Date: Fri, 12 Dec 2025 23:14:48 +0100 Subject: [PATCH] Dashboards: Never allow rows with hidden header to be collapsed (#115284) Never allow rows with hidden header to be collapsed --- .../dashboard-scene/scene/layout-rows/RowItemRenderer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard-scene/scene/layout-rows/RowItemRenderer.tsx b/public/app/features/dashboard-scene/scene/layout-rows/RowItemRenderer.tsx index 80c16b2f2a1..8d74ff46e3c 100644 --- a/public/app/features/dashboard-scene/scene/layout-rows/RowItemRenderer.tsx +++ b/public/app/features/dashboard-scene/scene/layout-rows/RowItemRenderer.tsx @@ -18,7 +18,8 @@ import { isDashboardLayoutGrid } from '../types/DashboardLayoutGrid'; import { RowItem } from './RowItem'; export function RowItemRenderer({ model }: SceneComponentProps) { - const { layout, collapse: isCollapsed, fillScreen, hideHeader: isHeaderHidden, isDropTarget, key } = model.useState(); + const { layout, collapse, fillScreen, hideHeader: isHeaderHidden, isDropTarget, key } = model.useState(); + const isCollapsed = collapse && !isHeaderHidden; // never allow a row without a header to be collapsed const isClone = isRepeatCloneOrChildOf(model); const { isEditing } = useDashboardState(model); const [isConditionallyHidden, conditionalRenderingClass, conditionalRenderingOverlay] = useIsConditionallyHidden(