-
Notifications
You must be signed in to change notification settings - Fork 1k
fix: keep DataTable container filled when paginate #6439
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
Conversation
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.
I tested with the following code and I am still seeing the issue
<Box margin="large" height="200px" overflow="auto">
<DataTable
pin="header"
columns={columns}
data={DATA}
step={5}
paginate
/>
</Box>
I think moving the pagination controls into the overflow container may not be the best user experience. I would expect to be able to switch pages without having to scroll through the table. Also if It looks like setting |
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 looks good to me, I'm going to tag @taysea as well for review on this. I just want to make sure that there are no issues with setting flex: true
that I may have missed.
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.
Behavior looks good to me, I'm trying to remember why we'd initially decided to do flex: false
with Pagination PR.
What does this PR do?
It will keep the fill style when DataTable has pagination
Where should the reviewer start?
What testing has been done on this PR?
Manual test with other storybooks and one unit test
How should this be manually tested?
Copy the component from https://codesandbox.io/s/grommet-v2-not-working-pin-with-paginate-ctth91
Do Jest tests follow these best practices?
screen
is used for querying.userEvent
is used in place offireEvent
.asFragment()
is used for snapshot testing.Any background context you want to provide?
What are the relevant issues?
#6333
Screenshots (if appropriate)
Do the grommet docs need to be updated?
Should this PR be mentioned in the release notes?
Is this change backwards compatible or is it a breaking change?