-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
"react-to-print" did not receive a contentRef
#724
Comments
@jnsereko I fixed this in your PR. The issue is that |
I feel silly right now. @MatthewHerbst feel free to reopen this in case of anything else |
Hey friends, I was traveling the last few days so just seeing this now. Previously the function returned by |
It is a nice convenience, I think! |
The only downside is that the |
Could it be as easy as something like: handlePrint(event?: unknown, content?: UseReactToPrintHookContent) {
const contentHook === content ?? typeof event === "function" ? event : undefined;
// do stuff
}; I think this still works for the |
Yeah, an overload like that is what I'm imagining as well, make it super hard to screw up. I was imagining doing something along the lines of |
Description
@MatthewHerbst I am not able to print content using
react-to-print
's 3.0.0-beta-1.This is because i have no control of the OptionalContent that i literally don't supply from my code.
As a result, the
contentRef
element passed touseReactToPrint
is not picked up hence erroringError
My code
cc @ibacher @denniskigen @pirupius
The text was updated successfully, but these errors were encountered: