From 6eb3a941dd52809d1e746c44f551b57ef6852dd1 Mon Sep 17 00:00:00 2001 From: Dawid Pers Date: Wed, 3 Jun 2026 15:54:20 +0200 Subject: [PATCH] fix: correct GenericList pagination offset calculation for postShift > 0 Simplified offset formula to: totalItemsBefore + postShiftValue. Removed incorrect isAjaxCall/isFirstCall branching that caused duplicate articles when postShift was non-zero (e.g. aerotelegraph postShift=3). Cleaned up unused isAjaxCall/isFirstCall params from function signature, all callers, and client-side InfiniteScrollButton. --- package.json | 2 +- .../widgets/Lists/GenericList/GenericList.astro | 4 +--- .../Lists/GenericList/GenericListGetData.ts | 4 +--- .../generalParts/InfiniteScrollButton.astro | 8 +------- src/helpers/GenericListHelper.ts | 14 ++------------ .../seo/SeoMetaData/SeoListGridPrevNext.ts | 4 +--- 6 files changed, 7 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index c736c3fc..34c4b6b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hat-ring-components", - "version": "4.14.1", + "version": "4.14.2", "description": "Head App Template - RING components", "license": "MIT", "repository": {}, diff --git a/src/components/widgets/Lists/GenericList/GenericList.astro b/src/components/widgets/Lists/GenericList/GenericList.astro index bb621f59..a09c3f97 100644 --- a/src/components/widgets/Lists/GenericList/GenericList.astro +++ b/src/components/widgets/Lists/GenericList/GenericList.astro @@ -22,9 +22,7 @@ const allGeneralParts = GeneralParts; let queryFragment = ''; let response: any = null; -const isAjaxCall = UtilsHelper_getQueryParam('gridLocationWidgetType', context) === 'genericList'; -const isFirstCall = UtilsHelper_getQueryParam('isFirstCall', context) === '1'; -const offset = WidgetHelper_calculateOffsetForGenericListPagination(widgetConfig, currentPage, isAjaxCall, isFirstCall); +const offset = WidgetHelper_calculateOffsetForGenericListPagination(widgetConfig, currentPage); if (offset >= 1000) { toRender = `