-
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] Fix multiple grid focus restoration issues #5530
Commits on Jan 11, 2022
-
[elastic#5517] Add
isFocusedCellInView
state to track visibility- and use this to determine whether or not the entire grid should have a tabindex/be focusable, rather than a simple 'hasFocus' check which doesn't account for virtualization - Add new mockFocusContext for easier testing for various tests that need to set a focus context - EuiDataGridCell - DRY out an `this.isFocusedCell` method - Call `setIsFocusedCellInView` on mount and on unmount (`setFocusedCell` handles setting true/false on new cell focus) - Write new unit tests for componentWillUnmount - Clean up unnecessary uncovered function fallback for this.unsubscribeCell - we're already checking for a falsy value before calling it
Configuration menu - View commit details
-
Copy full SHA for c06db86 - Browse repository at this point
Copy the full SHA c06db86View commit details -
[REVERT] Update demo to test noninteractive headers with scrolling co…
…ntent - see http://localhost:8030/#/tabular-content/data-grid-focus
Configuration menu - View commit details
-
Copy full SHA for 7f031ac - Browse repository at this point
Copy the full SHA 7f031acView commit details -
[elastic#5517] Add
onItemsRendered
ref to store currently visible/v……irtualized refs - see https://react-window.vercel.app/#/api/FixedSizeGrid for `onItemsRendered` API - this struck me as the quickest/easiest way to determine which virtualized cells are in view - I opted to save this as a ref instead of as state as I didn't see the need to cause a rerender - `focusFirstVisibleInteractiveCell` was split out to its own fn as it will shortly be used elsewhere to fix another focus bug in the grid
Configuration menu - View commit details
-
Copy full SHA for 2f44ab9 - Browse repository at this point
Copy the full SHA 2f44ab9View commit details -
Configuration menu - View commit details
-
Copy full SHA for d29d938 - Browse repository at this point
Copy the full SHA d29d938View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a035de - Browse repository at this point
Copy the full SHA 8a035deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 129febd - Browse repository at this point
Copy the full SHA 129febdView commit details -
Revert "[REVERT] Update demo to test noninteractive headers with scro…
…lling content" This reverts commit 7f031ac.
Configuration menu - View commit details
-
Copy full SHA for 0fce549 - Browse repository at this point
Copy the full SHA 0fce549View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fad086 - Browse repository at this point
Copy the full SHA 4fad086View commit details -
Merge branch 'main' into datagrid/5517/4923/5476
Constance authoredJan 11, 2022 Configuration menu - View commit details
-
Copy full SHA for bd7f192 - Browse repository at this point
Copy the full SHA bd7f192View commit details -
[PR feedback] Account for empty grids
- gridItemsRendered will be falsey if rowCount is 0 and will cause an error on tab, so we should opt to simply leave focus on the grid body wrapper
Configuration menu - View commit details
-
Copy full SHA for 9a69534 - Browse repository at this point
Copy the full SHA 9a69534View commit details
Commits on Jan 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 694621b - Browse repository at this point
Copy the full SHA 694621bView commit details