Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIOR-1173 Preview contains blank page when trying to print an order #1516

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Allow Editing of "Renewal Date" and "Subscription to" on open purchase order line. Refs UIOR-1078.
* Add missed permission to fetch org types in view only mode. Refs UIOR-1168.
* Preview contains blank page when trying to print an order. Refs UIOR-1173.

## [5.0.0](https://github.com/folio-org/ui-orders/tree/v5.0.0) (2023-10-12)
[Full Changelog](https://github.com/folio-org/ui-orders/compare/v4.0.3...v5.0.0)
Expand Down
9 changes: 7 additions & 2 deletions src/PrintOrder/PrintOrder.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,17 @@ export const PrintOrderComponent = ({ mutator, order, orderLine, onCancel }) =>
...printData,
},
}));

handlePrint();
})();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

useEffect(() => {
if (printableOrder) {
handlePrint();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [printableOrder]);

return (
<PrintContent
ref={componentRef}
Expand Down
Loading