-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Provide a general summary of the feature here
scrollIntoView is called when moving focus around the table, but it does not take into sticky elements, so when a table cell is sticky, you can move into a table cell but it is not brought into view because it is behind the sticky cell and the current logic does not scroll so it is visible.
🤔 Expected Behavior?
scrollIntoView takes sticky elements that are children of a scroll container into account.
😯 Current Behavior
sticky elements are ignored
💁 Possible Solution
I made a POC that works, modifying scrollIntoView
- find sticky elements that are a child of the current "scrollView"
- see if the sticky elements overlap with the current element being scrolled into view
- if so, adjust the scroll one way or another so they are in view
Additionally, if you call scrollIntoView on a sticky element, don't try and scroll its immediate parent which will stop focussing on sticky cells from making the rows move by 1px each time.
If accepted I will make a PR along these lines so please indicate if this kind of approach sounds good.
🔦 Context
We have a table with a sticky first and last column and we would like the keyboard navigation to work - scrolling the cell into view when it is highlighted.
💻 Examples
No response
🧢 Your Company/Team
Saxo Bank
🕷 Tracking Issue
No response