Skip to content

Commit

Permalink
UIOR-1173 Preview contains blank page when trying to print an order (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaSedyx authored and usavkov-epam committed Nov 8, 2023
1 parent 8452f94 commit 3663807
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## (5.0.1 IN PROGRESS)

* 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

0 comments on commit 3663807

Please sign in to comment.