Open ksalpern opened 1 month ago
I have a similar issue but I experienced it when some documents that have been fetched want to be displayed according to user's choice, the pdf is not re-rendered. For my case, this solution can solve the issue by adding a key to DocViewer with a value of file name
Hope this solution can help in your case
I found PDFRender use mainState
from PDFProvider
like this:
but in PDFProvider
, it combines mainState
with state
only at initial time and not update any more:
so i think we can update mainState
either in useEffect
or obtain it from PDFProvider
like this <PDFContext.Provider value={{ state, dispatch, mainState }}>
@cyntler I would love to see a proper fix for this
Hey, thank you a lot for this lib, it made my life easier with PDFs!)
I had an issue in my app, I have input for PDF files. It work perfectly for the first time, but when I want to upload a new file, file name changes, file URL also changes but document preview itself doesn't change. I checked your Storybook with PDF input and as you can see, the same result here.
https://github.com/user-attachments/assets/223c71eb-7cd9-44e4-a6f4-4e9424c64159