From b0b3d8cd7f4dee56fadd9069ea5077f9d7a8b101 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Thu, 23 May 2024 08:18:37 +0100 Subject: [PATCH 1/2] Bugfix: Collection: determine if the filter's `skip` has a preconfigured value --- .../core/collection/default/collection-default.context.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts index 542304592c..49ba44fa87 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts @@ -120,11 +120,14 @@ export class UmbDefaultCollectionContext< this.pagination.setPageSize(this.#config.pageSize); } + const filterValue = this.#filter.getValue() as FilterModelType; + this.#filter.setValue({ ...this.#defaultFilter, ...this.#config, ...this.#filter.getValue(), - skip: 0, + ...filterValue, + skip: filterValue.skip ?? 0, take: this.#config.pageSize, }); From a9a12e76c8bce0bb1122b3cfeeafaeb003dc7d3c Mon Sep 17 00:00:00 2001 From: leekelleher Date: Thu, 23 May 2024 09:36:33 +0100 Subject: [PATCH 2/2] Removed duplicate value --- .../core/collection/default/collection-default.context.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts index 49ba44fa87..eb7e0046c6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts @@ -125,7 +125,6 @@ export class UmbDefaultCollectionContext< this.#filter.setValue({ ...this.#defaultFilter, ...this.#config, - ...this.#filter.getValue(), ...filterValue, skip: filterValue.skip ?? 0, take: this.#config.pageSize,