frontend: persist scrollbar on last page, even if short, to avoid horizontal shifting
Massimo Melina committed
Feb 10, 2023 at 22:47 UTC
596ac9f697dd926da538e0d1a15a2a24a92587c7
1 file changed
+4
frontend/src/BrowseFiles.ts
+4
@@ -122,6 +122,10 @@ interface PagingProps {
122
pageChange:(newPage:number, goBottom?:boolean) => void
123
}
124
const Paging = memo(({ nPages, current, pageSize, pageChange }: PagingProps) => {
125
+ useEffect(() => {
126
+ document.body.style.overflowY = 'scroll'
127
+ return () => { document.body.style.overflowY = '' }
128
+ }, [])
129
const ref = useRef<HTMLElement>()
130
useEffect(() => ref.current?.scrollIntoView({ block: 'nearest' }), [current])
131
return h('div', { id:'paging' },