msyavuz commented on code in PR #35998:
URL: https://github.com/apache/superset/pull/35998#discussion_r2518976074
##########
superset-frontend/src/components/Chart/chartReducer.ts:
##########
@@ -67,6 +67,15 @@ export default function chartReducer(
};
},
[actions.CHART_UPDATE_STARTED](state) {
+ const controller = state.queryController;
+ /**
+ * Race condition fix for cross-filters:
+ * When a filter is removed while charts are loading, abort the
+ * in-flight request to prevent stale filtered data from rendering.
+ */
+ if (controller) {
+ setTimeout(() => controller.abort(), 0);
Review Comment:
Should this abort live in action creator? Or can we use redux toolkit for
extra reducers? Having a side effect in reducers are really not recommended:
https://redux.js.org/usage/side-effects-approaches
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]