fix(sql lab): SQL Lab Compile Query Delay (#20206)

This commit is contained in:
Diego Medina
2022-05-27 02:42:01 -04:00
committed by GitHub
parent 75e0fc25eb
commit 653cf773f7
9 changed files with 35 additions and 35 deletions

View File

@@ -917,9 +917,13 @@ export function updateSavedQuery(query) {
}
export function queryEditorSetSql(queryEditor, sql) {
return { type: QUERY_EDITOR_SET_SQL, queryEditor, sql };
}
export function queryEditorSetAndSaveSql(queryEditor, sql) {
return function (dispatch) {
// saved query and set tab state use this action
dispatch({ type: QUERY_EDITOR_SET_SQL, queryEditor, sql });
dispatch(queryEditorSetSql(queryEditor, sql));
if (isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE)) {
return SupersetClient.put({
endpoint: encodeURI(`/tabstateview/${queryEditor.id}`),