-
Notifications
You must be signed in to change notification settings - Fork 841
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
[EuiDataGrid] Actually fix calls to tabbable instead of moving the issue to a different part of the code #5163
[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 😱)
@@ -248,16 +248,16 @@ const IS_JEST_ENVIRONMENT = global.hasOwnProperty('_isJest'); | |||
* and search its ancestors for a div[data-datagrid-cellcontent], if any, | |||
* 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this !
is the main change
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 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/ |
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.
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