We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f796a1d commit 83d5b67Copy full SHA for 83d5b67
src/components/PrintSyllabus.tsx
@@ -84,8 +84,10 @@ export const PrintSyllabus = ({ blockData }: { blockData: BlockResponse }) => {
84
const printSyllabus = () => {
85
const blocks = blockData?.blocks;
86
const rootBlock = blockData?.blocks[blockData.root];
87
- setSrcdoc(buildSyllabusForPrint(intl, blocks, rootBlock));
88
- iframeRef.current.contentWindow.print();
+ const srcdoc = buildSyllabusForPrint(intl, blocks, rootBlock);
+ var iframe = document.createElement('iframe');
89
+ iframe.setAttribute("style", "display:none");
90
+ iframe.contentWindow.print();
91
};
92
93
return (
0 commit comments