Comcast / Comcast/react-data-grid
Master Detail scroll into view
- Dominant language
- TypeScript
- Stars
- 7.7k
- Forks
- 2.2k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 33
Description
## Describe the bug
The scroll into view mechanic for normal table cells works fine. However, when using the Master Detail pattern, scroll into view can be a poor design choice when DataGrid overflows.
Below is a quick video that demonstrates an overflowed DataGrid with Master Detail. The first few seconds is me horizontally scrolling with a trackpad. The quick left to right movement afterward occurs whenever I click on the expanded row. This happens because of scroll into view.
When trying to select text in the expanded row, it also causes the scroll into view to trigger multiple times, making it hard to read/select text.
https://user-images.githubusercontent.com/11511460/167506018-3924f986-97c6-4320-8cce-ef7f97af3183.mov
## To Reproduce
1. Create DataGrid
2. Add two columns with large width, enough to cause DataGrid to overflow scroll
3. Add the Master Detail column `expanded` key with `formatter` that has a similarly large width for the detail row
4. Add sample row
6. Expand the row
7. Click/select text on detail row
## Expected behavior
Scroll into view should be disabled for detail rows.
## Environment
- `react-data-grid` version: 7.0.0-beta.12
- `react`/`react-dom` version: 18
Contributor guide
Assessment
This issue has not been assessed yet.