Commit df17f7dc by Torkel Ödegaard

fixed explore width-0 issue, fixes #15304

parent c71904e3
...@@ -205,28 +205,34 @@ export class Explore extends React.PureComponent<ExploreProps> { ...@@ -205,28 +205,34 @@ export class Explore extends React.PureComponent<ExploreProps> {
<div className="explore-container"> <div className="explore-container">
<QueryRows exploreEvents={this.exploreEvents} exploreId={exploreId} queryKeys={queryKeys} /> <QueryRows exploreEvents={this.exploreEvents} exploreId={exploreId} queryKeys={queryKeys} />
<AutoSizer onResize={this.onResize} disableHeight> <AutoSizer onResize={this.onResize} disableHeight>
{({ width }) => ( {({ width }) => {
<main className="m-t-2" style={{ width }}> if (width === 0) {
<ErrorBoundary> return null;
{showingStartPage && <StartPage onClickExample={this.onClickExample} />} }
{!showingStartPage && (
<> return (
{supportsGraph && !supportsLogs && <GraphContainer width={width} exploreId={exploreId} />} <main className="m-t-2" style={{ width }}>
{supportsTable && <TableContainer exploreId={exploreId} onClickCell={this.onClickLabel} />} <ErrorBoundary>
{supportsLogs && ( {showingStartPage && <StartPage onClickExample={this.onClickExample} />}
<LogsContainer {!showingStartPage && (
exploreId={exploreId} <>
onChangeTime={this.onChangeTime} {supportsGraph && !supportsLogs && <GraphContainer width={width} exploreId={exploreId} />}
onClickLabel={this.onClickLabel} {supportsTable && <TableContainer exploreId={exploreId} onClickCell={this.onClickLabel} />}
onStartScanning={this.onStartScanning} {supportsLogs && (
onStopScanning={this.onStopScanning} <LogsContainer
/> exploreId={exploreId}
)} onChangeTime={this.onChangeTime}
</> onClickLabel={this.onClickLabel}
)} onStartScanning={this.onStartScanning}
</ErrorBoundary> onStopScanning={this.onStopScanning}
</main> />
)} )}
</>
)}
</ErrorBoundary>
</main>
);
}}
</AutoSizer> </AutoSizer>
</div> </div>
)} )}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment