rusackas opened a new issue, #44153:
URL: https://github.com/apache/superset/issues/44153
Follow-up from #44031 (h/t @gabotorresruiz for the catch).
`src/utils/downloadAsPdf.ts` and `src/utils/downloadAsImage.tsx` both import
`addWarningToast` directly from `src/components/MessageToasts/actions`
instead of a dispatch-bound callback:
- `downloadAsPdf.ts:59` returns the raw action object from its event handler;
every caller discards it, so nothing reaches the toast reducer.
- `downloadAsImage.tsx:391,436,536,617` calls the raw creator and drops the
result in all four places.
Same root cause #44031 fixed for `exportPivotExcel`: these creators are
plain object factories with no dispatch of their own, so the missing-element
warning toast silently never renders in either file.
Fix is the same bound-callback pattern landed in #44031: accept an optional
`addWarningToast` callback bound via `useToasts()` / `bindActionCreators` at
each call site, with a test asserting the toast actually fires.
--
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]