Add pagination in room timeline

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura committed 2021-11-18 13:32:12 +05:30
1 parent ef42ce949d
commit 49e3d724c0
12 files changed
+305 -235

No files matched your search

+10
View File
@@ -84,3 +84,13 @@ export function getUrlPrams(paramName) {
const urlParams = new URLSearchParams(queryString);
return urlParams.get(paramName);
}
export function getScrollInfo(target) {
const scroll = {};
scroll.top = Math.round(target.scrollTop);
scroll.height = Math.round(target.scrollHeight);
scroll.viewHeight = Math.round(target.offsetHeight);
scroll.bottom = Math.round(scroll.top + scroll.viewHeight);
scroll.isScrollable = scroll.height > scroll.viewHeight;
return scroll;
}