mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
fix: changed react-grid-layout to use grafana fork to a commit before 15503084fb
, this fixes all the panel movement bugs, fixes #10831
This commit is contained in:
parent
7fb34f7918
commit
dff2c14aed
@ -155,7 +155,7 @@
|
||||
"prop-types": "^15.6.0",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"react-grid-layout": "^0.16.2",
|
||||
"react-grid-layout-grafana": "0.16.0",
|
||||
"react-highlight-words": "^0.10.0",
|
||||
"react-popper": "^0.7.5",
|
||||
"react-select": "^1.1.0",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import ReactGridLayout from 'react-grid-layout';
|
||||
import ReactGridLayout from 'react-grid-layout-grafana';
|
||||
import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN, GRID_COLUMN_COUNT } from 'app/core/constants';
|
||||
import { DashboardPanel } from './DashboardPanel';
|
||||
import { DashboardModel } from '../dashboard_model';
|
||||
@ -50,7 +50,8 @@ function GridWrapper({
|
||||
onResize={onResize}
|
||||
onResizeStop={onResizeStop}
|
||||
onDragStop={onDragStop}
|
||||
onLayoutChange={onLayoutChange}>
|
||||
onLayoutChange={onLayoutChange}
|
||||
>
|
||||
{children}
|
||||
</ReactGridLayout>
|
||||
);
|
||||
@ -178,7 +179,7 @@ export class DashboardGrid extends React.Component<DashboardGridProps, any> {
|
||||
panelElements.push(
|
||||
<div key={panel.id.toString()} className={panelClasses}>
|
||||
<DashboardPanel panel={panel} getPanelContainer={this.props.getPanelContainer} />
|
||||
</div>,
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -196,7 +197,8 @@ export class DashboardGrid extends React.Component<DashboardGridProps, any> {
|
||||
onWidthChange={this.onWidthChange}
|
||||
onDragStop={this.onDragStop}
|
||||
onResize={this.onResize}
|
||||
onResizeStop={this.onResizeStop}>
|
||||
onResizeStop={this.onResizeStop}
|
||||
>
|
||||
{this.renderPanels()}
|
||||
</SizedReactLayoutGrid>
|
||||
);
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import '~react-grid-layout/css/styles.css';
|
||||
@import '~react-grid-layout-grafana/css/styles.css';
|
||||
@import '~react-resizable/css/styles.css';
|
||||
|
||||
.panel-in-fullscreen {
|
||||
|
15
yarn.lock
15
yarn.lock
@ -8275,16 +8275,23 @@ react-dom@^16.2.0:
|
||||
object-assign "^4.1.1"
|
||||
prop-types "^15.6.0"
|
||||
|
||||
"react-draggable@^2.2.6 || ^3.0.3", react-draggable@^3.0.3:
|
||||
"react-draggable@^2.2.6 || ^3.0.3":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-3.0.3.tgz#a6f9b3a7171981b76dadecf238316925cb9eacf4"
|
||||
dependencies:
|
||||
classnames "^2.2.5"
|
||||
prop-types "^15.5.10"
|
||||
|
||||
react-grid-layout@^0.16.2:
|
||||
version "0.16.2"
|
||||
resolved "https://registry.yarnpkg.com/react-grid-layout/-/react-grid-layout-0.16.2.tgz#ef09b0b6db4a9635799663658277ee2d26fa2994"
|
||||
react-draggable@^3.0.3:
|
||||
version "3.0.5"
|
||||
resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-3.0.5.tgz#c031e0ed4313531f9409d6cd84c8ebcec0ddfe2d"
|
||||
dependencies:
|
||||
classnames "^2.2.5"
|
||||
prop-types "^15.6.0"
|
||||
|
||||
react-grid-layout-grafana@0.16.0:
|
||||
version "0.16.0"
|
||||
resolved "https://registry.yarnpkg.com/react-grid-layout-grafana/-/react-grid-layout-grafana-0.16.0.tgz#12242153fcd0bb80a26af8e41694bc2fde788b3a"
|
||||
dependencies:
|
||||
classnames "2.x"
|
||||
lodash.isequal "^4.0.0"
|
||||
|
Loading…
Reference in New Issue
Block a user