Closed FranciscoMateusVG closed 3 years ago
Hi! Thank you, I really appreciate your feedback :) In theory such a control can be added into the package itself, but I'm bot sure that the default navigation bar should intercept key presses of the whole page. It can break other part of application.
I'm ready to discuss if this should be inside the package or not, but currently you have a following option:
Let me know what do you think about these options :)
@MGrin i made a custom navigation (option 2) and it worked like a charm. Much apreciated by the help, thanks a lot, if you ever come to Brazil the first round of beer is on me!
Hi have create custom navigation and trying to call handlePrevClick, handleNextClick from that function but not working <PDFViewer document={{ url: file, }} navigation={CustomNavigation} />
const CustomNavigation = props => { const classes = useStyles(); const { page, pages } = props; console.log("props",props)
const { handlePrevClick, handleNextClick } = props;
function downloadPDF() {
window.open(file, '_blank');
}
return (
<div className={classes.brochureFooter}>
<Grid container>
<Grid item xs={4}>
<CustomPrevButton
page={page}
pages={pages}
handlePrevClick={handlePrevClick}
/>
<CustomNextButton
page={page}
pages={pages}
handleNextClick={handleNextClick}
/>
</Grid>
<Grid item xs={4}>
<CustomPages page={page} pages={pages} />
</Grid>
</Grid>
</div>
);
};
@MGrin i made a custom navigation (option 2) and it worked like a charm. Much apreciated by the help, thanks a lot, if you ever come to Brazil the first round of beer is on me!
HEY can you please help me i am also facing the same issue
Hi! First of all, great package thanks a lot!
I was wandering if it was possible to call those functions (handleNextClick and handlePrevClick) on keydown events. Like for example, a user presses the "->" key and that would trigger the handleNextClick function.