Closed donhook closed 6 months ago
Well add the type then!
function onItemClick({ pageNumber: itemPageNumber }: { pageNumber: number }) {
setPageNumber(itemPageNumber);
}
Thanks for your time... i tried that, still didnt resolve issue. Will continue to see what I have wrong in the environment or setup.
Before you start - checklist
Description
I am getting the Error: Invalid pageIndex request when I click on an item in the outline. Not sure what the issue is....
Followed the Outline Recipe.
...
I have "noImplicitAny": true, in my ts.config
Steps to reproduce
Define the onItem Click Function in the page
function onItemClick({ pageNumber: itemPageNumber}) { setPageNumber(itemPageNumber); }
Define the outline tag
Expected behavior
Click on an outline item and the appropriate PDF page is displayed
Actual behavior
Receiving a type error in VS code: Type error: Binding element 'itemPageNumber' implicitly has an 'any' type.
Receiving an unhandled runtime error: Error: Invalid pageIndex request. When clicking on an outline item.
Additional information
Not sure what misconfiguration i have
Environment