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

Fixed page size for tables #435

Closed
timroes opened this issue Feb 22, 2018 · 4 comments
Closed

Fixed page size for tables #435

timroes opened this issue Feb 22, 2018 · 4 comments

Comments

@timroes
Copy link
Contributor

timroes commented Feb 22, 2018

Currently you can specify the pageSizeOptions in EuiInMemoryTable (and most likely others), which will always show the page size options select box or when not specified not having pagination at all.

To rebuild our current table vis using EUI, we would require to configure the page size from the outside without showing the options. I think we could create another parameter, like fixedPageSize or more implicitly pageSizeOptions using a numeric value instead of an array, that will cause the table not to show the page size selector, but always use this page size.

TL;DR: Option to use pagination with a specified page size, without showing the select box below it :-)

@timroes timroes changed the title Fixed pagination for tables Fixed page size for tables Feb 22, 2018
@uboness
Copy link
Contributor

uboness commented Feb 23, 2018

++ I never liked the fact that the table always shows the page size option...

@walnutdust
Copy link
Contributor

Hi - wanted to ask if this issue was still open. EuiTablePagination seems to have a hidePerPageOptions which provides a method to:

use pagination with a specified page size, without showing the select box below it :-)

Otherwise, if the focus of the issue is instead to provide an alternative interface (e.g. automatically detecting when pageSizeOptions is a number rather than an array, or an array with only one number, and hiding the select box), I would like to work on it!

@chandlerprall
Copy link
Contributor

EuiTablePagination seems to have a hidePerPageOptions which provides a method to:

Thanks for checking! Yes, this functionality does exist, exposed as the hidePerPageOptions option on pagination prop for both EuiBasicTable and EuiInMemoryTable. I see we are missing:

  • proper documentation for EuiInMemoryTable's pagination prop
  • Adding pagination to a BasicTable docs section has a toggle to show/hide the pagination bar, but it is setup backwards

@chandlerprall
Copy link
Contributor

EuiInMemoryTable's and EuiBasicTable's pagination prop takes a hidePerPageOptions value to hide the page size options:

<EuiInMemoryTable pagination={{ hidePerPageOptions: true }} .../>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants