fix(deps): update dependency react-to-print to v3 #1103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.14.12->^3.0.0Release Notes
MatthewHerbst/react-to-print (react-to-print)
v3.2.0Compare Source
printIframePropsprop to allow setting certain print iframe props for privacy & securityv3.1.1Compare Source
EventdevDependenciesv3.1.0Compare Source
onBeforePrintuseReactToPrintcallback directly to event handlersv3.0.6Compare Source
react-to-print. Thanks FatahChanv3.0.5Compare Source
onAfterPrintto not always fire when the print window closes. Thanks sensasi-delightv3.0.4Compare Source
videoelements with an emptysrcattribute do not prevent printing from continuing. Thanks @Can-Chenv3.0.3Compare Source
onAfterPrintis called, and print iframe is removed, after the print preview dialog has closed. Previously these would happen when theafterprintevent was received which, as noted in the README, may occur immediately in some browsers, rather than when the print preview dialog closes. Thanks sensasi-delightnull/undefinedinitial typesdevDependenciesto latest, including now using React 19 for our examplesBeta Versions
3.0.3-beta-1(16th Dec 2024)v3.0.2Compare Source
<select>option printed. Currently the first option is printed regardless of selection statev3.0.1Compare Source
useReactToPrintdirectly to event handlers (this is primarily geared at non-typescript users who are not aware of the new v3 API that prefers the function be wrapped, by changingonClick={printFn}toonClick={() => printFn()})v3.0.0Compare Source
v3.0.0 brings API modernization, React 19 support, a smaller package size, Shadow DOM support, and improved error handling.
BREAKING CHANGES
contentrenamed tocontentRefand type changed from() => React.ReactInstancetoRefObject<Element | Text>. The core impact here is that Class components now need to have the ref forwarded via props internally to a DOM nodeonBeforeGetContentremoved. UseonBeforePrint, which similar toonBeforeGetContent, now runs before the print iframe is loadedremoveAfterPrintrenamed topreserveAfterPrintwhich defaults tofalseReactToPrintremoved. UseuseReactToPrintPrintContextConsumerremoved. UseuseReactToPrinttriggerremoved, use the function returned byuseReactToPrintIReactToPrintPropsrenamed toUseReactToPrintOptionsuseReactToPrintexportevent?: unknowntype fromuseReactToPrintcallback.optionalContentis now the only (optional) argumentNew
canvaselements have not properly loadedcopyShadowRoots, to support copyingShadowRoots. Thanks boehlkeBeta Versions
3.0.0-beta-3(19 Aug 2024)3.0.0-beta-2(19 Aug 2024)3.0.0-beta-1(15 Jul 2024)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.