[EuiDataGrid] Allow the grid to expand & contract with changing rowCount values#5313
Merged
chandlerprall merged 5 commits intoelastic:masterfrom Oct 27, 2021
Conversation
…unts, when no pagination is present
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5313/ |
Contributor
|
I'm not sure if I'm testing incorrectly, but I'm on https://eui.elastic.co/pr_5313/#/tabular-content/data-grid on latest Firefox and this isn't working for me unfortunately. After 2 rows the max height appears to be cached and the scrollbar appears + removing rows does not fix the grid height. qhP7yKIONh.mp4 |
cee-chen
approved these changes
Oct 26, 2021
Contributor
cee-chen
left a comment
There was a problem hiding this comment.
My FF appears to be defective in its testing 🙈 Greg, Bree, and Trevor have all confirmed this is working for them, and the logic seems sound, so let's move ahead with this! (NB: don't forget to revert)
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5313/ |
ym
pushed a commit
to ym/eui
that referenced
this pull request
Oct 29, 2021
…unt values (elastic#5313) * Allow the datagrid to expand&contract in response to different row counts, when no pagination is present * changelog
This was referenced Nov 19, 2021
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses part of #5030, where increasing the row count in a pagination-less grid only works the first time, and subsequent updates trigger a scroll bar. The issue was the established height was being used to limit the grid's viewport, and that limit was being re-applied with changes to
rowCountinstead of dropping the limit & re-calculating.Before
rowcount_before.mov
After
rowcount_after.mov
Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation- [ ] Checked Code Sandbox works for any docs examples- [ ] Added or updated jest and cypress tests[revert me]commit