From efa428c329419c950c8ffb59b9f6262fedc5b6fd Mon Sep 17 00:00:00 2001 From: Polina Boneva <13227501+polibb@users.noreply.github.com> Date: Wed, 23 Aug 2023 14:49:31 +0300 Subject: [PATCH] Revert "Dashboard: Set descending z-index of panels in a dashboard" (#73677) Revert "Dashboard: Set descending z-index of panels in a dashboard (#73401)" This reverts commit f091e8f84a37f53e184789b7e53499b111cecc57. --- public/app/features/dashboard/dashgrid/DashboardGrid.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx index 2460cc5059a..a452b09a09c 100644 --- a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx +++ b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx @@ -152,14 +152,10 @@ export class DashboardGrid extends PureComponent { for (const panel of this.props.dashboard.panels) { const panelClasses = classNames({ 'react-grid-item--fullscreen': panel.isViewing }); - // used to allow overflowing content to show on top of the next panel - const descIndex = this.props.dashboard.panels.length - panelElements.length; - panelElements.push( { interface GrafanaGridItemProps extends React.HTMLAttributes { gridWidth?: number; gridPos?: GridPos; - descendingOrderIndex?: number; isViewing: boolean; windowHeight: number; windowWidth: number; @@ -296,7 +291,7 @@ const GrafanaGridItem = React.forwardRef(( let width = 100; let height = 100; - const { gridWidth, gridPos, isViewing, windowHeight, windowWidth, descendingOrderIndex, ...divProps } = props; + const { gridWidth, gridPos, isViewing, windowHeight, windowWidth, ...divProps } = props; const style: CSSProperties = props.style ?? {}; if (isViewing) { @@ -326,7 +321,7 @@ const GrafanaGridItem = React.forwardRef(( // props.children[0] is our main children. RGL adds the drag handle at props.children[1] return ( -
+
{/* Pass width and height to children as render props */} {[props.children[0](width, height), props.children.slice(1)]}