mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
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) {
|
if (changedQuery.changedOn > queriesLastUpdate) {
|
||||||
queriesLastUpdate = changedQuery.changedOn;
|
queriesLastUpdate = changedQuery.changedOn;
|
||||||
}
|
}
|
||||||
const prevState = state.queries[id].state;
|
newQueries[id] = { ...state.queries[id], ...changedQuery };
|
||||||
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,
|
|
||||||
};
|
|
||||||
change = true;
|
change = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user