From d3e66c749e9ff43e0fe3b8a931907d47d839b1e6 Mon Sep 17 00:00:00 2001 From: happyso Date: Thu, 31 Aug 2023 09:48:43 +0900 Subject: [PATCH] fix: offset reset when pagination limit onchange (#11703) Signed-off-by: sunyeongchoi --- ui/src/app/shared/components/pagination-panel.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/app/shared/components/pagination-panel.tsx b/ui/src/app/shared/components/pagination-panel.tsx index bde0a19bc59e..552654ce3ae8 100644 --- a/ui/src/app/shared/components/pagination-panel.tsx +++ b/ui/src/app/shared/components/pagination-panel.tsx @@ -40,8 +40,9 @@ export class PaginationPanel extends React.Component<{pagination: Pagination; on // Only return the offset if we're actually going to be limiting // the results we're requesting. If we're requesting all records, // we should not skip any by setting an offset. + // The offset must be initialized whenever the pagination limit is changed. if (limit) { - newValue.offset = this.props.pagination.offset; + newValue.offset = ''; } this.props.onChange(newValue);