-
Notifications
You must be signed in to change notification settings - Fork 890
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
[BUG] Table visualisations sometimes show results in a small scrollable portion of the screen #3737
Comments
Interesting - I'm actually having a little difficulty reproducing that exact behavior, but there's definitely a bug here with the viz sizing and pagination. Thanks for reporting - we'll take a look. |
@ananzh I tagged this as 2.7 - I'm not sure if that will be possible, but that's probably what we should aim for. |
@joshuarrrr I have updated the repro instructions above, I think I had the steps the wrong way around, apologies. |
@curq @jgough thanks for opening the issue and provide some initial thoughts. Kudos to @curq's finding and yes @curq @jgough do either one of you want to take this issue and #3756? |
@ananzh Could you please assign these issues to me? I'd like to try solving them. |
Sweet! @curq I have assigned both issues to you. |
@ananzh After further investigation, I have discovered that the root cause of the two issues is not the same. Regarding this issue, It looks like the state is being updated incorrectly or not being updated when needed. Additionally, I noticed that changing the order of rows in the options sidebar (asc/desc) does not work, and the height is sometimes not adjusted properly. I think we can also see that in the screenshot made by @jgough There is a weird behavior that state that is supposed to store value of height is never updated and the dynamic height adjustment works only when it is zero. Do you have any ideas or suggestions on how to resolve this issue? |
Yes, you are right. They are different root causes. #3756 is caused by the table container's layout and overflow behavior. As I explained earlier, this can be fixed by modifying the CSS for the table container. This issue is related to the EuiDataGrid component's handling of large amounts of data and pagination. The root cause lies within the resize not working/reacting on the initial load, resulting in the table displaying only a small area of the screen. I was thinking about adding below
Updating the CSS in this way also affects the way EuiDataGrid handles data within the table. With the modified CSS, the table container can now adjust its height based on the total number of rows in the grid (#3756). This indirectly solves the pagination issue by displaying more rows in the table within the available space and having the table appear correctly paginated. But I think your PR #3797 solves the root cause of the pagination logic to adjust the number of rows displayed in the table. So if the user sets a high value for max rows per page, the pageSize will be limited to the total number of rows, ensuring that there's no excessive empty space. @curq could you compare two approaches pros and cons? Maybe we should accept both, one for each issue. Then update your PR #3797 to fix both bugs. What do you think? Don't forget to update CHANGELOG. |
@ananzh I have reviewed both approaches and concluded that it is probably better to accept both. PR #3797 fixes the pagination logic, but it doesn't address the issue with the initial load. However, the approach you suggested does, and I have created a separate PR for it: #3816. By implementing both approaches, we can resolve the current issue and improve the pagination logic to prevent potential problems in the future. For instance, without the fix for pagination logic, when there is only one resulting page, the pagination controls are not rendered. This may lead to confusion as users might not realize that all results fit on one page. Here's a screenshot illustrating the issue: |
@curq this is great. I approved both PRs and I will have another reviewer to take a look. Meanwhile, once the mentioned unit test PR, I will have you add/modify the unit test and submit a new PR for the test. |
Describe the bug
When viewing many results in a table visualisation, these are only shown in a small area of the screen
To Reproduce
Steps to reproduce the behavior:
Open any table visualisation split by rows with a default size of 5 -or- Go to this Sandbox Page
Inside the Split rows bucket, change the Size to 100
Click on Update. More rows should be shown but it should be paginated.
Click on Options in the side panel
Change Max rows per page to 100
Note that only 10 rows are shown, but the data table is actually scrollable with the mouse wheel to view 100 results within the small window:
Expected behavior
If you perform the steps above and copy the current URL and paste into a new tab you get the expected behaviour which is a table showing more than 10 rows:
OpenSearch Version
2.6.0
Dashboards Version
2.6.0
Additional context
Reproduced in Edge 111.0.1661.54 and Firefox 102.9.0esr (64-bit)
The text was updated successfully, but these errors were encountered: