feat: add auto pagination detection

This commit is contained in:
Rohit Rajan
2025-11-30 14:48:03 +05:30
parent ad8df66ecd
commit 6cdeb0b0e2
6 changed files with 1149 additions and 9 deletions

View File

@@ -100,6 +100,7 @@ interface RRWebDOMBrowserRendererProps {
listSelector?: string | null;
cachedChildSelectors?: string[];
paginationMode?: boolean;
paginationSelector?: string;
paginationType?: string;
limitMode?: boolean;
isCachingChildSelectors?: boolean;
@@ -153,6 +154,7 @@ export const DOMBrowserRenderer: React.FC<RRWebDOMBrowserRendererProps> = ({
listSelector = null,
cachedChildSelectors = [],
paginationMode = false,
paginationSelector = "",
paginationType = "",
limitMode = false,
isCachingChildSelectors = false,
@@ -257,6 +259,13 @@ export const DOMBrowserRenderer: React.FC<RRWebDOMBrowserRendererProps> = ({
else if (listSelector) {
if (limitMode) {
shouldHighlight = false;
} else if (
paginationMode &&
paginationSelector &&
paginationType !== "" &&
!["none", "scrollDown", "scrollUp"].includes(paginationType)
) {
shouldHighlight = false;
} else if (
paginationMode &&
paginationType !== "" &&