-
Notifications
You must be signed in to change notification settings - Fork 11
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
the PDF doesn't rerender when scale change #5
Comments
This is a bug. I have the same problem. |
@hpsaah try to add |
Unbeautiful workaround: ...
const [renderCounter, setRenderCounter] = useState(0);
...
useEffect(() => {
setRenderCounter(renderCounter + 1);
}, [scale]);
...
<PDFReader
key={renderCounter}
scale={scale}
...
/>
... |
Thanks @FabianoLothor, changing the key property of the component you force to rerender |
Thanks for your help! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi i'am trying to use the component in another react component handling the scale at state but when i change it the pdf doesn't re-render
how can i fix it? i'am doing anything wrong or is a bug in the component?
thanks
The text was updated successfully, but these errors were encountered: