Skip to content

Commit

Permalink
fix: offset reset when pagination limit onchange
Browse files Browse the repository at this point in the history
Signed-off-by: sunyeongchoi <sn0716@naver.com>
  • Loading branch information
sunyeongchoi committed Aug 29, 2023
1 parent 27f1227 commit b0b05f0
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 b0b05f0

Please sign in to comment.