mirror of
https://github.com/apache/superset.git
synced 2026-08-03 20:42:30 +00:00
fix(drill-by): toast on download failure for consistency with drill-detail
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -373,13 +373,19 @@ export default function DrillByModal({
|
||||
|
||||
const handleDownload = useCallback(
|
||||
(exportType: 'csv' | 'xlsx') => {
|
||||
exportChart({
|
||||
formData: drilledFormData,
|
||||
resultFormat: exportType,
|
||||
resultType: 'full',
|
||||
Promise.resolve(
|
||||
exportChart({
|
||||
formData: drilledFormData,
|
||||
resultFormat: exportType,
|
||||
resultType: 'full',
|
||||
}),
|
||||
).catch(error => {
|
||||
addDangerToast(
|
||||
t('Failed to generate download: %s', error?.message || error),
|
||||
);
|
||||
});
|
||||
},
|
||||
[drilledFormData],
|
||||
[drilledFormData, addDangerToast],
|
||||
);
|
||||
|
||||
const handleDownloadCSV = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user