From 4e3b3cda9dfc3a045d63d3c576f3dcc0591ff1ae 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 Signed-off-by: Dillen Padhiar --- 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);