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

[BUG] Data Grid component renders unused empty space when number of rows per page larger than actual number of rows #699

Closed
curq opened this issue Apr 12, 2023 · 0 comments · Fixed by #726
Assignees
Labels
bug Something isn't working CCI College Contributor Initiative

Comments

@curq
Copy link
Contributor

curq commented Apr 12, 2023

Describe the bug
When the number of rows per page is larger than the number of input (rows), the height of the table container is adjusted to the max number of rows per page, rather than actual number of rows rendered. As a result empty unused space will be rendered. For example, when we got 100 results from the request but the number of rows per page 1000, it will render table with height that fits 1000 rows, so basically 90% of table will be empty. I made a fork of sandbox provided in docs to illustrate this issue.
This behavior was found when resolving this issue in Dashboards repo.

To Reproduce
Steps to reproduce the behavior:
I have provided a sandbox

  1. Open sandbox or any instance of datagrid component
  2. Please select the option 1000 numbers per page ( the number of actual rows of data is 100 in my example).

scr

3. Scroll down to bottom and you will see that huge amount of empty space is rendered. (100 rows and space for 900 rows)

Expected behavior
I'm not sure is this an expected behavior or not. So I was asked by @joshuarrrr to open this issue in my pull request in Dashboards repo that solves the problem that was caused by this described behavior. Here is the link to the issue that shows the problem.

Dashboards Version
2.6.0

Screenshots
Here is the screenshot from sandbox, in this image we reached the end of table, but there is still a lot of empty space below ( we can notice how scrollbar barely moved). The screenshot is from the sandbox
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CCI College Contributor Initiative
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants