[EuiDataGrid] Actually fix calls to tabbable instead of moving the issue to a different part of the code#5163
Merged
chandlerprall merged 5 commits intoelastic:masterfrom Sep 10, 2021
Conversation
… the entire grid (or worse 😱)
chandlerprall
commented
Sep 9, 2021
| * which is a valid target for disabling tabbing within | ||
| */ | ||
| function getParentCellContent(_element: Node | HTMLElement) { | ||
| export function getParentCellContent(_element: Node | HTMLElement) { |
Contributor
Author
There was a problem hiding this comment.
export for testing
chandlerprall
commented
Sep 9, 2021
| element.hasAttribute('data-datagrid-cellcontent') | ||
| element && // we haven't walked off the document yet | ||
| element.nodeName !== 'div' && // looking for a div | ||
| !element.hasAttribute('data-datagrid-cellcontent') // that has data-datagrid-cellcontent |
Contributor
Author
There was a problem hiding this comment.
this ! is the main change
Contributor
There was a problem hiding this comment.
🤦♀️ I feel super bad for not noticing this/digging into it a bit more deeply in the first PR. Apologies!
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5163/ |
1 task
cee-chen
reviewed
Sep 10, 2021
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5163/ |
cee-chen
reviewed
Sep 10, 2021
cee-chen
approved these changes
Sep 10, 2021
Contributor
cee-chen
left a comment
There was a problem hiding this comment.
Love it!! Thanks for the test changes - it's even more helpful for me to read the test cases in your own words!
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5163/ |
Closed
1 task
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
Fixes #5162
Um, so. I omitted a
!in an if statement in #5136 which interacted with itself in an extreme way when a column resize causes a column to drop off into the virtualization void.This PR:
Testing:
Set the main grid demo's page size to 100, then resize a column to drop one or more off the end.
/cc @kqualters-elastic if you'd like to test this within your grid
Before
After
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