mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 19:32:42 +00:00
Force browser repaint after closing Print dialog
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
const React = require('react');
|
||||
const Nav = require('naturalcrit/nav/nav.jsx');
|
||||
|
||||
module.exports = function(props){
|
||||
const printPage = () => {
|
||||
if (window.typeof !== 'undefined')
|
||||
window.frames['BrewRenderer'].contentWindow.print();
|
||||
};
|
||||
|
||||
return <Nav.item onClick={printPage} color='purple' icon='far fa-file-pdf'>
|
||||
module.exports = function({printFunction}){
|
||||
return <Nav.item onClick={printFunction} color='purple' icon='far fa-file-pdf'>
|
||||
get PDF
|
||||
</Nav.item>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user