jenwitteng commented on code in PR #42561:
URL: https://github.com/apache/superset/pull/42561#discussion_r3673620577
##########
superset-frontend/src/dashboard/components/gridComponents/Row/Row.tsx:
##########
@@ -207,6 +211,38 @@ const Row = memo((props: RowProps) => {
observerEnabler.observe(element);
observerDisabler.observe(element);
}
+
+ // Client-side "Download as Image/PDF" (see src/utils/downloadUtils.ts)
+ // dispatches these events so off-screen rows render before the capture
+ // and lazy loading is restored afterwards. Without this, virtualized
+ // charts are exported as loading spinners.
+ const handleForceInView = () => {
+ observerEnabler?.disconnect();
+ observerDisabler?.disconnect();
+ setIsInView(true);
+ };
Review Comment:
- The dashboard grid Chart is wrapped in React.memo with a comparator
(gridComponents/Chart/Chart.tsx:838-839) that short-circuits whenever
!isComponentVisible. A hidden-tab row flipping isInView is swallowed at the
memo boundary — the inner chart
never re-renders, shouldRenderChart/runQuery are never re-evaluated, no
mount, no query.
- Inactive antd tab panes are display:none/unmounted and aren't in the
.dashboard capture anyway.
Investigator + both skeptics unanimous: not real, no fix needed. Adding
the guard would be a behavioral no-op.
--
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]