Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination need to add next/first numbers in meta #46

Open
Fryguy opened this issue Mar 22, 2019 · 3 comments
Open

Pagination need to add next/first numbers in meta #46

Fryguy opened this issue Mar 22, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@Fryguy
Copy link
Contributor

Fryguy commented Mar 22, 2019

Right now, meta just has the limit and offset that was requested, but I think we should also add the limit and offset for next, last, etc (i.e. the numeric values for each the links). This makes using clients a lot easier because you don't have to parse the links for the values. I'm picturing something like the following in addition to the links.

{
  "meta": {
    "count": 1000,
    "limit": 100,
    "offset": 0,
    "first": {
      "limit": 100,
      "offset": 0
    },
    "next": {
      "limit": 100,
      "offset": 100
    },
    "last": {
      "limit": 100,
      "offset": 900
    }
}
@Fryguy Fryguy added the enhancement New feature or request label Mar 22, 2019
@Fryguy
Copy link
Contributor Author

Fryguy commented Mar 22, 2019

Related to #35 cc @martinpovolny @slemrmartin

@slemrmartin
Copy link
Contributor

@Fryguy good to know, but you probably wanted to cc other Martin :) @Hyperkid123

@Hyperkid123
Copy link

So i actually wanted to create same issue when i started using the pagination in UI. But because of how the PF4 pagination works this is not really necessary and limit + offset is enough. I can definitely imagine that these might be useful but i don't have a real use case for that right now (from UI perspective).

The only scenario this can be issue right now is if the first offset is not 0. I don't expect that ever happen though.

It should be probably added down the line but it is not urgent i think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants