Skip to content

Commit

Permalink
submit on update
Browse files Browse the repository at this point in the history
Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Aug 25, 2024
1 parent 7dc216f commit 42a6efd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/data/public/ui/query_editor/query_editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,11 @@ export default class QueryEditorUI extends Component<Props, State> {

if (!isEqual(this.props.query.dataset, prevQuery.dataset)) {
if (this.inputRef) {
const newQueryString = this.queryString.getInitialQuery().query;
const newQuery = this.queryString.getInitialQuery();
const newQueryString = newQuery.query;
if (this.inputRef.getValue() !== newQueryString) {
this.inputRef.setValue(newQueryString);
this.onSubmit(newQuery);
}
}
}
Expand Down

0 comments on commit 42a6efd

Please sign in to comment.