mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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 f091e8f84a
.
This commit is contained in:
parent
19a993b815
commit
efa428c329
@ -152,14 +152,10 @@ export class DashboardGrid extends PureComponent<Props> {
|
||||
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(
|
||||
<GrafanaGridItem
|
||||
key={panel.key}
|
||||
className={panelClasses}
|
||||
descendingOrderIndex={descIndex}
|
||||
data-panelid={panel.id}
|
||||
gridPos={panel.gridPos}
|
||||
gridWidth={gridWidth}
|
||||
@ -281,7 +277,6 @@ export class DashboardGrid extends PureComponent<Props> {
|
||||
interface GrafanaGridItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
gridWidth?: number;
|
||||
gridPos?: GridPos;
|
||||
descendingOrderIndex?: number;
|
||||
isViewing: boolean;
|
||||
windowHeight: number;
|
||||
windowWidth: number;
|
||||
@ -296,7 +291,7 @@ const GrafanaGridItem = React.forwardRef<HTMLDivElement, GrafanaGridItemProps>((
|
||||
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<HTMLDivElement, GrafanaGridItemProps>((
|
||||
|
||||
// props.children[0] is our main children. RGL adds the drag handle at props.children[1]
|
||||
return (
|
||||
<div {...divProps} style={{ ...divProps.style, zIndex: descendingOrderIndex }} ref={ref}>
|
||||
<div {...divProps} ref={ref}>
|
||||
{/* Pass width and height to children as render props */}
|
||||
{[props.children[0](width, height), props.children.slice(1)]}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user