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 for Tables #130

Closed
ronakmshah opened this issue Oct 21, 2016 · 2 comments
Closed

Pagination for Tables #130

ronakmshah opened this issue Oct 21, 2016 · 2 comments

Comments

@ronakmshah
Copy link
Contributor

Currently in the table graph, we show all the results that gets return from server.
Needs a way to paginate (10 per page) this response.

@curran
Copy link
Contributor

curran commented Nov 7, 2016

@t00f @ronakmshah I believe adding table pagination will require significant changes to the infrastructure for handling queries and results. Probably we should discuss this together before diving into an implementation.

The following things need to happen in order to implement pagination (based on my experiences implementing pagination in kibana-chord):

  • Each query that needs to support pagination must be modified to include a scroll property. This specifies how long to keep the context alive (see documentation - Keeping the search context alive)
  • The result set for each scrollable query will contain a scroll_id, which needs to be stored in order to retrieve the next page. I suppose this will need to be stored in the Redux store.
  • Each time we request the next page, we are effectively making a totally new query, based on the scroll id. I'm not sure how to best represent this in the Redux state. Maybe we can have one new query result entry for each page?
  • We'll need to add a user interface element or mechanism to trigger fetching the next page. In kibana-chord, this was a button. In other interfaces I've seen, it can be triggered by scrolling.

@t00f I would value your input here on how to structure the query and results as Redux state.

@t00f
Copy link
Contributor

t00f commented Dec 30, 2016

While searching how to solve this ticket, I found this library react-virtualized.

It has multiple options to deal with large data sets. Table component also as onScroll callback

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

No branches or pull requests

5 participants