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 <[email protected]>
  • Loading branch information
sunyeongchoi authored Aug 31, 2023
1 parent d3cb451 commit f5e31f8
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 f5e31f8

Please sign in to comment.