mirror of
https://github.com/apache/superset.git
synced 2026-04-23 10:04:45 +00:00
feat(sqllab): non-blocking persistence mode (#24539)
Co-authored-by: Justin Park <justinpark@apache.org>
This commit is contained in:
@@ -557,10 +557,9 @@ const SqlEditor: React.FC<Props> = ({
|
||||
[setQueryEditorAndSaveSql],
|
||||
);
|
||||
|
||||
const onSqlChanged = (sql: string) => {
|
||||
const onSqlChanged = useEffectEvent((sql: string) => {
|
||||
dispatch(queryEditorSetSql(queryEditor, sql));
|
||||
setQueryEditorAndSaveSqlWithDebounce(sql);
|
||||
};
|
||||
});
|
||||
|
||||
// Return the heights for the ace editor and the south pane as an object
|
||||
// given the height of the sql editor, north pane percent and south pane percent.
|
||||
@@ -785,7 +784,7 @@ const SqlEditor: React.FC<Props> = ({
|
||||
)}
|
||||
<AceEditorWrapper
|
||||
autocomplete={autocompleteEnabled}
|
||||
onBlur={setQueryEditorAndSaveSql}
|
||||
onBlur={onSqlChanged}
|
||||
onChange={onSqlChanged}
|
||||
queryEditorId={queryEditor.id}
|
||||
height={`${aceEditorHeight}px`}
|
||||
|
||||
Reference in New Issue
Block a user