From e6ae925f1caa1b806998679f6b6bdec648ecb7bb Mon Sep 17 00:00:00 2001 From: M_Kececi Date: Mon, 20 Apr 2026 10:32:07 +0300 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ui/src/stores/ProductPricingStore.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/stores/ProductPricingStore.js b/ui/src/stores/ProductPricingStore.js index a401d8f..de09c84 100644 --- a/ui/src/stores/ProductPricingStore.js +++ b/ui/src/stores/ProductPricingStore.js @@ -115,6 +115,10 @@ export const useProductPricingStore = defineStore('product-pricing-store', { const nextCursorHeader = toText(res?.headers?.['x-next-cursor']) const data = Array.isArray(res?.data) ? res.data : [] const mapped = data.map((x, i) => mapRow(x, i, baseIndex)) + const fallbackNextCursor = mapped.length > 0 + ? toText(mapped[mapped.length - 1]?.productCode) + : '' + const nextCursor = nextCursorHeader || fallbackNextCursor if (append) { const merged = [...this.rows] const seen = new Set(this.rows.map((x) => x?.productCode)) @@ -135,13 +139,13 @@ export const useProductPricingStore = defineStore('product-pricing-store', { row_count: this.rows.length, fetched_count: mapped.length, has_more: this.hasMore, - next_cursor: nextCursorHeader || null + next_cursor: nextCursor || null }) return { traceId, fetched: mapped.length, hasMore: this.hasMore, - nextCursor: nextCursorHeader + nextCursor } } catch (err) { if (!append) this.rows = []