Repository navigation
[EuiDataGrid] Actually fix calls to tabbable instead of moving the issue to a different part of the code - #5163
Conversation
… the entire grid (or worse 😱)
| * which is a valid target for disabling tabbing within | ||
| */ | ||
| function getParentCellContent(_element: Node | HTMLElement) { | ||
| export function getParentCellContent(_element: Node | HTMLElement) { |
There was a problem hiding this comment.
export for testing
| 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 |
There was a problem hiding this comment.
this ! is the main change
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/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5163/ |
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/ |
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