etr2460 commented on a change in pull request #11778:
URL:
https://github.com/apache/incubator-superset/pull/11778#discussion_r529743100
##########
File path: superset-frontend/src/dashboard/components/HeaderActionsDropdown.jsx
##########
@@ -145,7 +148,14 @@ class HeaderActionsDropdown extends React.PureComponent {
this.props.showPropertiesModal();
break;
case MENU_KEYS.DOWNLOAD_AS_IMAGE:
- downloadAsImage('.dashboard', this.props.dashboardTitle)(domEvent);
+ setTimeout(
+ () =>
+ downloadAsImage(
+ screenshotNodeSelector,
+ this.props.dashboardTitle,
+ )({ currentTarget }),
+ 1000,
Review comment:
If this is the solution that ends up being needed, can you:
1. Make the timeout a descriptively named constant
2. Add comments explaining why this is necessary
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]