trigger pagination if table body is delayed populated
All checks were successful
delpoy / build-and-deploy (push) Successful in 43s

This commit is contained in:
2024-11-29 12:54:54 +01:00
parent c89cbdd389
commit aacd618d4f
2 changed files with 8 additions and 12 deletions

View File

@@ -43,9 +43,15 @@
);
new MutationObserver(async (entries) => {
if (entries.filter((e) => e.removedNodes.length > 0).length === 0 || !entries) return;
if (!entries) {
return;
} else if (
entries.findIndex((e) => e.addedNodes.length > 0 || e.removedNodes.length > 0) == -1
) {
return;
}
intersectionObserver.unobserve(intersectionElement);
if (intersectionElement) intersectionObserver.unobserve(intersectionElement);
intersectionObserver.observe((intersectionElement = await getIntersectionElement()));
}).observe(bodyElem, { childList: true });