zhaoyongjie commented on code in PR #21497:
URL: https://github.com/apache/superset/pull/21497#discussion_r974838729
##########
superset-frontend/src/explore/actions/saveModalActions.js:
##########
@@ -215,3 +218,23 @@ export const getDashboard = dashboardId => async dispatch
=> {
throw error;
}
};
+
+// Get dashboards the slice is added to
+export const getSliceDashboards = slice => async dispatch => {
+ if (slice) {
Review Comment:
if you don't want to send a request, you shouldn't call this action. e.g.:
```
const originalDashboards = this.props.slice ? await
this.props.actions.getSliceDashboards(
this.props.slice,
) : [];
```
just a personal suggestion, optimize it for the future. thanks for the
fixing.
--
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]