Fix chart panel auto-open
This commit is contained in:
@@ -73,7 +73,7 @@ function ChartPanel(props: Props) {
|
|||||||
))
|
))
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ width: '100%', height: '100%', padding: '8px' }}>
|
<div style={{ width: '100%', height: '100%', padding: '8px', flex: 1, overflow: 'hidden scroll' }}>
|
||||||
<Grid container spacing={1}>
|
<Grid container spacing={1}>
|
||||||
<TransitionGroup component={null} className="example">
|
<TransitionGroup component={null} className="example">
|
||||||
{charts}
|
{charts}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function ContentView(props: Props) {
|
|||||||
allowResize={true}
|
allowResize={true}
|
||||||
style={{ height: 'calc(100vh - 64px)' }}
|
style={{ height: 'calc(100vh - 64px)' }}
|
||||||
pane1Style={{ maxHeight: '100%' }}
|
pane1Style={{ maxHeight: '100%' }}
|
||||||
pane2Style={{ borderTop: '1px solid #999', overflow: 'hidden scroll' }}
|
pane2Style={{ borderTop: '1px solid #999', display: 'flex' }}
|
||||||
onChange={setHeight}
|
onChange={setHeight}
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
@@ -68,7 +68,9 @@ function ContentView(props: Props) {
|
|||||||
</div>
|
</div>
|
||||||
</ReactSplitPane>
|
</ReactSplitPane>
|
||||||
</span>
|
</span>
|
||||||
<div>
|
{/** Passing height constraints via flex options down */}
|
||||||
|
<div style={{ flex: 1, display: 'flex', height: '100%' }}>
|
||||||
|
{/** Resize detector must not be in the scroll zone, it needs to detect actual available size */}
|
||||||
<ReactResizeDetector handleHeight={true} onResize={detectSize} />
|
<ReactResizeDetector handleHeight={true} onResize={detectSize} />
|
||||||
<ChartPanel />
|
<ChartPanel />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user