Skip to content

Commit ce14705

Browse files
committed
Remove onRunQuery
1 parent 520d17e commit ce14705

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

src/JsonPathQueryField.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ import { QueryField } from '@grafana/ui';
55
interface Props {
66
query: string;
77
onBlur: () => void;
8-
onRunQuery: () => void;
98
onChange: (v: string) => void;
109
}
1110

12-
export const JsonPathQueryField: React.FC<Props> = ({ query, onBlur, onRunQuery, onChange }) => {
11+
export const JsonPathQueryField: React.FC<Props> = ({ query, onBlur, onChange }) => {
1312
return (
1413
<div style={{ marginRight: '4px', width: '100%' }}>
1514
<QueryField
1615
query={query}
1716
onBlur={onBlur}
18-
onRunQuery={onRunQuery}
1917
onChange={onChange}
2018
portalOrigin="jsonapi"
2119
placeholder="$.items[*].name"

src/QueryEditor.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,7 @@ export const QueryEditor: React.FC<Props> = ({ onRunQuery, onChange, query }) =>
7676
>
7777
Query
7878
</InlineFormLabel>
79-
<JsonPathQueryField
80-
onBlur={onRunQuery}
81-
onChange={onChangePath(index)}
82-
query={field.jsonPath}
83-
onRunQuery={() => {}}
84-
/>
79+
<JsonPathQueryField onBlur={onRunQuery} onChange={onChangePath(index)} query={field.jsonPath} />
8580
<InlineFormLabel width={3} className="query-keyword">
8681
Alias
8782
</InlineFormLabel>

src/VariableQueryEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const VariableQueryEditor: React.FC<VariableQueryProps> = ({ onChange, qu
3030
>
3131
Query
3232
</InlineFormLabel>
33-
<JsonPathQueryField onBlur={saveQuery} onChange={onChangePath} query={state.jsonPath} onRunQuery={() => {}} />
33+
<JsonPathQueryField onBlur={saveQuery} onChange={onChangePath} query={state.jsonPath} />
3434
</div>
3535
);
3636
};

0 commit comments

Comments
 (0)