Skip to content

Commit

Permalink
Run query on lost focus
Browse files Browse the repository at this point in the history
  • Loading branch information
lunaticusgreen committed Mar 22, 2024
1 parent 961379e commit 78fab3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/views/QueryEditor/QueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function QueryEditor(props: QueryEditorProps<CHDataSource, CHQuery, CHDat
query={initializedQuery}
height={200}
onSqlChange={onSqlChange}
onRunQuery={onRunQuery}
onRunQuery={onTriggerQuery}
onFieldChange={onFieldChange}
formattedData={formattedData}
datasource={datasource}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const SQLCodeEditor = ({ query, onSqlChange, onRunQuery, datasource }: an
}

return (
<div style={{ position: 'relative', width: '100%', marginTop: '10px'}} onBlur={onRunQuery}>
<div style={{ position: 'relative', width: '100%', marginTop: '10px'}} >
<CodeEditor
height={Math.max(query.query.split('\n').length * 18, 150)}
value={query.query}
Expand All @@ -32,6 +32,7 @@ export const SQLCodeEditor = ({ query, onSqlChange, onRunQuery, datasource }: an
}, 10)
}}
onChange={onSqlChange}
onBlur={onRunQuery}
/>
</div>
);
Expand Down

0 comments on commit 78fab3d

Please sign in to comment.