diff --git a/src/routes/RequestsRoute.js b/src/routes/RequestsRoute.js index 8409aaeb..c89a6067 100644 --- a/src/routes/RequestsRoute.js +++ b/src/routes/RequestsRoute.js @@ -1321,7 +1321,9 @@ class RequestsRoute extends React.Component { ); onAfterPrintForSinglePrintButton = () => { - this.props.mutator.resultOffset.replace(0); + if (this.state.isViewPrintDetailsEnabled) { + this.props.mutator.resultOffset.replace(0); + } } printContentRefs = {}; @@ -1520,11 +1522,7 @@ class RequestsRoute extends React.Component { await this.savePrintEventDetails(requestIds); } }} - onAfterPrint={() => { - if (isViewPrintDetailsEnabled) { - mutator.resultOffset.replace(0); - } - }} + onAfterPrint={() => this.onAfterPrintForSinglePrintButton()} > { - if (isViewPrintDetailsEnabled && resources.resultOffset) { - mutator.resultOffset.replace(0); - this.setState({ selectedRows: {} }); - } - }} + onAfterPrint={() => this.onAfterPrintForSinglePrintButton()} >