From e5faeb324da3b0cb9ce336f7c7e013883e649d9d Mon Sep 17 00:00:00 2001 From: kay delaney <45561153+kaydelaney@users.noreply.github.com> Date: Fri, 15 Mar 2024 09:48:29 +0000 Subject: [PATCH] Scenes: Make repeat panels respect maxPerRow (#84497) --- .../features/dashboard-scene/scene/PanelRepeaterGridItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/dashboard-scene/scene/PanelRepeaterGridItem.tsx b/public/app/features/dashboard-scene/scene/PanelRepeaterGridItem.tsx index d02442c2075..1ce4054f67e 100644 --- a/public/app/features/dashboard-scene/scene/PanelRepeaterGridItem.tsx +++ b/public/app/features/dashboard-scene/scene/PanelRepeaterGridItem.tsx @@ -196,7 +196,7 @@ function useLayoutStyle(direction: RepeatDirection, itemCount: number, maxPerRow if (direction === 'h') { const rowCount = Math.ceil(itemCount / maxPerRow); - const columnCount = Math.ceil(itemCount / rowCount); + const columnCount = Math.min(itemCount, maxPerRow); return css({ display: 'grid',