From b5c33c540c0ea1a6ee77ad8a07c43b78c61ba34b Mon Sep 17 00:00:00 2001 From: kay delaney <45561153+kaydelaney@users.noreply.github.com> Date: Thu, 4 Apr 2024 14:49:42 +0100 Subject: [PATCH] Dashboards: Removes descending z-index assignment for grid items (#85563) --- .../app/features/dashboard/dashgrid/DashboardGrid.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx index 52a08bb7a99..f265fe4f52a 100644 --- a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx +++ b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx @@ -221,15 +221,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 - // requires parent create stacking context to prevent overlap with parent elements - const descIndex = this.props.dashboard.panels.length - panelElements.length; - const p = ( { interface GrafanaGridItemProps extends React.HTMLAttributes { gridWidth?: number; gridPos?: GridPos; - descendingOrderIndex?: number; isViewing: boolean; windowHeight: number; windowWidth: number; @@ -378,7 +372,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) { @@ -408,7 +402,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)]}