diff --git a/public/app/plugins/datasource/graphite/state/context.tsx b/public/app/plugins/datasource/graphite/state/context.tsx index 6433325f773..9fc504f075e 100644 --- a/public/app/plugins/datasource/graphite/state/context.tsx +++ b/public/app/plugins/datasource/graphite/state/context.tsx @@ -36,6 +36,7 @@ export const GraphiteQueryEditorContext = ({ }); }, []); + // synchronise changes provided in props with editor's state useEffect(() => { dispatch(actions.timeRangeChanged(range)); }, [dispatch, range]); diff --git a/public/app/plugins/datasource/graphite/state/store.ts b/public/app/plugins/datasource/graphite/state/store.ts index 394ef6a5bb5..b7dc42bcf66 100644 --- a/public/app/plugins/datasource/graphite/state/store.ts +++ b/public/app/plugins/datasource/graphite/state/store.ts @@ -168,8 +168,6 @@ const reducer = async (action: Action, state: GraphiteQueryEditorState): Promise handleTargetChanged(state); } if (actions.runQuery.match(action)) { - // handleTargetChanged() builds target from segments/tags/functions only, - // it doesn't handle refresh when target is change explicitly state.refresh(state.target.target); } if (actions.toggleEditorMode.match(action)) {