mirror of https://github.com/apache/superset.git
Revert "fix: SQL Lab show "Refetch Results" button while fetching new query results (#15109)" (#15301)
This reverts commit 408d58f937
.
This commit is contained in:
parent
ab153e66cc
commit
5b2eb8d933
|
@ -517,20 +517,7 @@ export default function sqlLabReducer(state = {}, action) {
|
|||
if (changedQuery.changedOn > queriesLastUpdate) {
|
||||
queriesLastUpdate = changedQuery.changedOn;
|
||||
}
|
||||
const prevState = state.queries[id].state;
|
||||
const currentState = changedQuery.state;
|
||||
newQueries[id] = {
|
||||
...state.queries[id],
|
||||
...changedQuery,
|
||||
// race condition:
|
||||
// because of async behavior, sql lab may still poll a couple of seconds
|
||||
// when it started fetching or finished rendering results
|
||||
state:
|
||||
currentState === 'success' &&
|
||||
['fetching', 'success'].includes(prevState)
|
||||
? prevState
|
||||
: currentState,
|
||||
};
|
||||
newQueries[id] = { ...state.queries[id], ...changedQuery };
|
||||
change = true;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue