Merge branch 'main' into feat/download-toast

This commit is contained in:
Lucas Smith
2023-12-07 15:46:43 +11:00
committed by GitHub
183 changed files with 7670 additions and 4245 deletions

View File

@@ -65,9 +65,10 @@ export const DataTableActionButton = ({ row }: DataTableActionButtonProps) => {
});
const link = window.document.createElement('a');
const baseTitle = row.title.includes('.pdf') ? row.title.split('.pdf')[0] : row.title;
link.href = window.URL.createObjectURL(blob);
link.download = row.title || 'document.pdf';
link.download = baseTitle ? `${baseTitle}_signed.pdf` : 'document.pdf';
link.click();