Outline onItemClick only works once
Before you start - checklist
- [X] I followed instructions in documentation written for my React-PDF version
- [X] I have checked if this bug is not already reported
- [X] I have checked if an issue is not listed in Known issues
- [x] If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo
Description
Hello, I was using your example of Display interactive Table of Contents. The display works: it changes the page of the pdf when I click to the links. However each link only works once, when I click the same link over 2 times it doesn't change the page.
Steps to reproduce
- Click on one of the link from the table of contents.
- Click on another link.
- Click on the first link you clicked.
- The page doesn't change on step 3.
Expected behavior
- Click on one of the link from the table of contents -> should change the page
- Click on another link -> should change to another page
- Click on the first link you clicked -> should change back to the page like in step 1.
Actual behavior
- Click on one of the link from the table of contents -> change the page
- Click on another link -> change to another page
- [Issue here] Click on the first link you clicked -> the page is not changing
Additional information
No response
Environment
- Browser (if applicable): Chrome 99
- React-PDF version: 5.7.2
- React version: 18.0.0
I am also experiencing this exact same behavior on version 5.7.2, react version 17.0.2. Same browser.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.
This issue was closed because it has been stalled for 14 days with no activity.
@wojtekmaj I also experience the same issue on version 5.7.2, react version 16.8.6. Pls suggest if this is a bug or an implementation mistake from my side? Thank you.