Merge pull request #577 from influxdata/rgl-width

Provide width to react grid layout
pull/580/head
Nathan Haugo 2016-11-17 09:45:25 -08:00 committed by GitHub
commit b1a295dcb8
1 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,8 @@
import React, {PropTypes} from 'react';
import AutoRefresh from 'shared/components/AutoRefresh';
import LineGraph from 'shared/components/LineGraph';
import ReactGridLayout from 'react-grid-layout';
import ReactGridLayout, {WidthProvider} from 'react-grid-layout';
const GridLayout = WidthProvider(ReactGridLayout);
import _ from 'lodash';
const RefreshingLineGraph = AutoRefresh(LineGraph);
@ -99,9 +100,9 @@ export const LayoutRenderer = React.createClass({
render() {
return (
<ReactGridLayout layout={this.state.layout} isDraggable={false} isResizable={false} cols={12} rowHeight={90} width={1200}>
<GridLayout layout={this.state.layout} isDraggable={false} isResizable={false} cols={12} rowHeight={90} width={1200}>
{this.generateGraphs()}
</ReactGridLayout>
</GridLayout>
);
},
});