Skip to content

Conversation

@skosito
Copy link
Contributor

@skosito skosito commented Sep 13, 2021

Still need to verify edge cases, but in good shape to review idea and approach imo, first pass.
Goal of these changes is showing prev/next page pagination prompt and results message whenever user request list of results, so user can easily see page size, page count and navigate between pages.
Example:

Showing record(s) 5-10 out of 15 record(s)
de84f7dc-3f63-4125-9302-9795b98cf2c4
efac6a1d-8db2-4a74-92bc-f4305f7b893e
99a8ae53-3d51-4734-800e-ecadedf26bb0
ba132bba-c8d2-4315-8ea0-7eb70aa5cdc7
4febe360-f109-4daf-b1e1-bd97f621ffd9
Use the arrow keys to navigate: ↓ ↑ → ←
? :
  > >> Next Page
    << Prev Page

Provide-go PR that contains changes used here provideplatform/provide-go#8

My idea was to make and reuse generic "auto pagination" and pagination code.

p.Page--
}

func (p *Pagination) UpdateCountsAndPrintCurrentInterval(totalCount string, resultsLength int) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still need to verify some edge cases here

@skosito skosito requested a review from kthomas September 13, 2021 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants