Skip to content

Commit 352a267

Browse files
authored
Merge pull request grafana#12873 from grafana/davkal/explore-fix-split
Explore: Fix initial state in split view
2 parents 6316d63 + e832f91 commit 352a267

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

public/app/containers/Explore/Explore.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ export class Explore extends React.Component<any, IExploreState> {
207207
datasourceError: null,
208208
datasourceLoading: true,
209209
graphResult: null,
210+
latency: 0,
210211
logsResult: null,
211212
queryErrors: [],
212213
queryHints: [],
@@ -254,7 +255,10 @@ export class Explore extends React.Component<any, IExploreState> {
254255
this.setState({
255256
graphResult: null,
256257
logsResult: null,
258+
latency: 0,
257259
queries: ensureQueries(),
260+
queryErrors: [],
261+
queryHints: [],
258262
tableResult: null,
259263
});
260264
};
@@ -276,8 +280,10 @@ export class Explore extends React.Component<any, IExploreState> {
276280

277281
onClickSplit = () => {
278282
const { onChangeSplit } = this.props;
283+
const state = { ...this.state };
284+
state.queries = state.queries.map(({ edited, ...rest }) => rest);
279285
if (onChangeSplit) {
280-
onChangeSplit(true, this.state);
286+
onChangeSplit(true, state);
281287
}
282288
};
283289

0 commit comments

Comments
 (0)