Description
For the virtualized dataGrid (@fluentui-contrib/react-data-grid-react-window), the scrollbar is on the body
This is fine if the columns all fit without a horizontal overflow, however if there is some horizontal scrollbar there's no way to scroll both the body and the headers at the same time. So when autoFitColumns
is set to false, this causes issues
overflow-x: auto
can be applied to the parent container, but that means the vertical scrollbar won't be visible unless the user scrolls all the way to the right
https://codesandbox.io/p/sandbox/datagrid-body-overflow-forked-ygzvhs?workspaceId=2e8388ff-7617-4f14-8fb7-fe6621520941
overflow-x: auto
can be applied to the DataGridBody
, but that means the DataGridHeader
s won't scroll with the body and the column data and headers will be misaligned
https://codesandbox.io/p/sandbox/datagrid-bodysize-bug-forked-6xqrry?file=%2Fsrc%2Fexample.tsx
(for the sandboxes, try resizing some columns to be larger and then observe the scrollbar positions/behaviours)