Skip to content

Commit 5be5af2

Browse files
committed
Don't run query on editor change, fixes #70
1 parent 5930032 commit 5be5af2

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/components/QueryEditor/ElasticsearchQueryContext.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ describe('ElasticsearchQueryContext', () => {
4141
// Should also set timeField to the configured `timeField` option in datasource configuration
4242
expect(changedQuery.timeField).toBe(datasource.timeField);
4343

44-
expect(onRunQuery).toHaveBeenCalled();
4544
});
4645

4746
// the following applies to all hooks in ElasticsearchQueryContext as they all share the same code.

src/components/QueryEditor/ElasticsearchQueryContext.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ export const ElasticsearchProvider = ({
4141
const onStateChange = useCallback(
4242
(query: ElasticsearchQuery) => {
4343
onChange(query);
44-
onRunQuery();
4544
},
46-
[onChange, onRunQuery]
45+
[onChange]
4746
);
4847

4948
const reducer = combineReducers<Pick<ElasticsearchQuery, 'query' | 'alias' | 'metrics' | 'bucketAggs'>>({

0 commit comments

Comments
 (0)