mirror of
https://github.com/apache/superset.git
synced 2026-04-13 21:24:28 +00:00
committed by
Maxime Beauchemin
parent
166c576c94
commit
ae0655028f
@@ -28,6 +28,7 @@ class ExploreViewContainer extends React.Component {
|
||||
super(props);
|
||||
this.state = {
|
||||
height: this.getHeight(),
|
||||
width: this.getWidth(),
|
||||
showModal: false,
|
||||
};
|
||||
}
|
||||
@@ -72,6 +73,10 @@ class ExploreViewContainer extends React.Component {
|
||||
this.props.actions.chartUpdateStopped(this.props.queryRequest);
|
||||
}
|
||||
|
||||
getWidth() {
|
||||
return `${window.innerWidth}px`;
|
||||
}
|
||||
|
||||
getHeight() {
|
||||
if (this.props.forcedHeight) {
|
||||
return this.props.forcedHeight + 'px';
|
||||
@@ -90,7 +95,7 @@ class ExploreViewContainer extends React.Component {
|
||||
handleResize() {
|
||||
clearTimeout(this.resizeTimer);
|
||||
this.resizeTimer = setTimeout(() => {
|
||||
this.setState({ height: this.getHeight() });
|
||||
this.setState({ height: this.getHeight(), width: this.getWidth() });
|
||||
}, 250);
|
||||
}
|
||||
|
||||
@@ -128,6 +133,7 @@ class ExploreViewContainer extends React.Component {
|
||||
return (
|
||||
<ChartContainer
|
||||
actions={this.props.actions}
|
||||
width={this.state.width}
|
||||
height={this.state.height}
|
||||
/>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user