Skip to content

Commit

Permalink
fix: offset reset when pagination limit onchange (argoproj#11703)
Browse files Browse the repository at this point in the history
Signed-off-by: sunyeongchoi <sn0716@naver.com>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
  • Loading branch information
sunyeongchoi authored and dpadhiar committed May 9, 2024
1 parent ee4c5b3 commit 4e3b3cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/src/app/shared/components/pagination-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4e3b3cd

Please sign in to comment.