-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Enable Table Pagination #118557
[Lens] Enable Table Pagination #118557
Conversation
…6778/table-pagination
@elasticmachine merge upstream |
merge conflict between base and head |
@elasticmachine merge upstream |
@flash1293 @mbondyra this is ready for another look whenever you have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx
Show resolved
Hide resolved
x-pack/plugins/lens/public/datatable_visualization/components/toolbar.tsx
Show resolved
Hide resolved
The logic that is hiding it is here. It checks if the number of rows is less than the lowest page-size option. So, if we were to allow the user to select pages of size A good middle ground might be to add a page size option of A final option might be to disable the pagination toggle in the toolbar if the row count is less than the minimum possible page size. What do you think? |
I think we can just leave it as is and add an info tooltip to the setting (pagination is hidden if there are less than 10 items) |
@flash1293 done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a weird bug, I suspect related to EuiDataGrid
component rather than this PR, that gets triggered by a combination of the Pagination feature with the Column-pivot feature in Lens:
- Create a table with Rows + Metrics
- Enable pagination
- Add a Columns dimension to "pivot"
- Now the table is no longer scrollable 🤔
It is still possible to access the last rows via keyboard, but not via scrolling:
Tested on Chrome and Safari, and can reproduce with both.
@dej611 Could you open an EUI issue for this? Seems pretty weird |
I think this big warning here may be related: https://elastic.github.io/eui/#/tabular-content/data-grid-virtualization In the demo it explains that sometimes the table needs some strong hints about rerendering. I'm trying to isolate the issue for reproduction on the EUI. |
x-pack/plugins/lens/public/datatable_visualization/components/table_basic.tsx
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally with Safari 👍
Summary
This PR allows users to enable pagination in their data tables.
Resolves #96778
Screen.Recording.2021-11-15.at.10.54.13.AM.mov
Checklist
Delete any items that are not applicable to this PR.