Skip to content

Commit

Permalink
fix: offset reset when pagination limit onchange (#11703)
Browse files Browse the repository at this point in the history
Signed-off-by: sunyeongchoi <sn0716@naver.com>
  • Loading branch information
sunyeongchoi authored and terrytangyuan committed Sep 5, 2023
1 parent 81ccebd commit d3e66c7
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 d3e66c7

Please sign in to comment.