Skip to content

Commit

Permalink
Merge pull request grafana#12873 from grafana/davkal/explore-fix-split
Browse files Browse the repository at this point in the history
Explore: Fix initial state in split view
  • Loading branch information
marefr authored Aug 21, 2018
2 parents 6316d63 + e832f91 commit 352a267
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion public/app/containers/Explore/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export class Explore extends React.Component<any, IExploreState> {
datasourceError: null,
datasourceLoading: true,
graphResult: null,
latency: 0,
logsResult: null,
queryErrors: [],
queryHints: [],
Expand Down Expand Up @@ -254,7 +255,10 @@ export class Explore extends React.Component<any, IExploreState> {
this.setState({
graphResult: null,
logsResult: null,
latency: 0,
queries: ensureQueries(),
queryErrors: [],
queryHints: [],
tableResult: null,
});
};
Expand All @@ -276,8 +280,10 @@ export class Explore extends React.Component<any, IExploreState> {

onClickSplit = () => {
const { onChangeSplit } = this.props;
const state = { ...this.state };
state.queries = state.queries.map(({ edited, ...rest }) => rest);
if (onChangeSplit) {
onChangeSplit(true, this.state);
onChangeSplit(true, state);
}
};

Expand Down

0 comments on commit 352a267

Please sign in to comment.