Skip to content

Commit

Permalink
fix(ui): don't show pagination warning on first page if all are displ…
Browse files Browse the repository at this point in the history
…ayed (#11979)
  • Loading branch information
agilgur5 authored and terrytangyuan committed Nov 3, 2023
1 parent 98aba15 commit 0e04980
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 @@ -19,7 +19,8 @@ export function PaginationPanel(props: {pagination: Pagination; onChange: (pagin
}>
Next page <i className='fa fa-chevron-right' />
</button>
{props.pagination.limit > 0 ? (
{/* if pagination is used, and we're either not on the first page, or are on the first page and have more records than the page limit */}
{props.pagination.limit > 0 && (props.pagination.offset || (!props.pagination.offset && props.numRecords >= props.pagination.limit)) ? (
<>
<WarningIcon /> Workflows cannot be globally sorted when paginated
</>
Expand Down

0 comments on commit 0e04980

Please sign in to comment.