fix: Exclude header controls from dashboard PDF export (#27068)

This commit is contained in:
Kamil Gabryjelski 2024-02-09 18:02:05 +01:00 committed by GitHub
parent f59498fcb9
commit 005cee023b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ declare module 'dom-to-pdf' {
filename: string;
image: Image;
html2canvas: object;
excludeClassNames?: string[];
}
const domToPdf = (

View File

@ -61,6 +61,7 @@ export default function downloadAsPdf(
filename: `${generateFileStem(description)}.pdf`,
image: { type: 'jpeg', quality: 1 },
html2canvas: { scale: 2 },
excludeClassNames: ['header-controls'],
};
return domToPdf(elementToPrint, options)
.then(() => {