-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix DataTable flex and pagination issue #6501
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
alignSelf="end" | ||
// flex none needed for Pagination controls to stay in correct | ||
// location and prevent overflow outside container | ||
style={{ flex: 'none' }} |
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.
Is there any way this can be handled in paginationProps or something other than style
?
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.
Good comment, I changed this to be flex={false}
to avoid using the style prop.
alignSelf="end" | ||
// flex false is needed for Pagination controls to stay in | ||
// correct location and prevent overflow outside container | ||
flex={false} |
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.
Should Pagination set this itself internally? When would we ever want Pagination to flex?
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.
Good question. I couldn't think of a case where we want Pagination to flex. I went back and added flex={false}
to Pagination
<Pagination alignSelf="end" {...paginationProps} /> | ||
<Pagination | ||
alignSelf="end" | ||
// flex false is needed for Pagination controls to stay in |
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.
Can probably remove this comment now.
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.
Oops yes forgot to remove that
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.
Fixed
What does this PR do?
Fixed an issue introduced in #6439 that caused cells to stretch (see screenshots). This PR reverts the change from #6439 but still fixes the original issue #6333.
Cells are stretching:

Fixed:

Where should the reviewer start?
What testing has been done on this PR?
Tested with the code from #6333 and tested with the MultiplePins story by adding
step={3}
andpaginate
.How should this be manually tested?
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
grommet/hpe-design-system#2949
Screenshots (if appropriate)
Do the grommet docs need to be updated?
No
Should this PR be mentioned in the release notes?
Yes
Is this change backwards compatible or is it a breaking change?
Backwards compatible