When a formatter (column headerRenderer or formatter) renders an element with a tabIndex="0"
attribute, the horizontal scroll jumps beyond expected focus. I believe this is due to a query selector using [tabIndex="0"]
called within the scrollIntoView
function here: https://github.com/adazzle/react-data-grid/blob/main/src/DataGrid.tsx#L775
tabIndex="0"
attributetabIndex="0"
column, note the cell first gets focustabIndex
column, but the focused cell is the same (and may not be in view anymore)Link to code example:
https://codesandbox.io/s/elastic-snowflake-t9siek
In the code sandbox link, keep the browser tab width small and scroll all the way to the right-most column. Click on a row cell (column FIVE
row foo
) more than once and see the grid scroll far to the left.
The focused cell should remain in the grid view.
react-data-grid
version: 7.0.0-beta.20 (but this appears to be an issue since beta-13, does not repro in beta-12)react
/react-dom
version: 18.0.0Owner Name | adazzle |
Repo Name | react-data-grid |
Full Name | adazzle/react-data-grid |
Language | TypeScript |
Created Date | 2015-03-06 |
Updated Date | 2023-03-23 |
Star Count | 5922 |
Watcher Count | 129 |
Fork Count | 2072 |
Issue Count | 161 |
Issue Title | Created Date | Updated Date |
---|