fix: center block scrolling on mark items

This commit is contained in:
enes 2024-09-19 09:54:51 +02:00
parent 5f39b55f68
commit aec0d0bdd8

View File

@ -33,7 +33,8 @@ const PdfPageItem = ({
useEffect(() => {
if (selectedMark !== null && !!markRefs.current[selectedMark.id]) {
markRefs.current[selectedMark.id]?.scrollIntoView({
behavior: 'smooth'
behavior: 'smooth',
block: 'center'
})
}
}, [selectedMark])