Skip to content

Commit

Permalink
fix: add key to pdf viewer iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
pikann committed Feb 6, 2024
1 parent 900de22 commit 61fb4bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/giant-tables-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-pdf/renderer": major
---

Add key to PDFViewer's iframe to fix the browser history issue
1 change: 1 addition & 0 deletions packages/renderer/src/dom/PDFViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const PDFViewer = ({
ref={innerRef}
style={style}
className={className}
key={crypto.randomUUID()}
{...props}
/>
);
Expand Down

0 comments on commit 61fb4bc

Please sign in to comment.