Comcast / Comcast/react-data-grid

Master Detail scroll into view

Aperta
#2,907 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
7.7k
Fork
2.2k
Merge medio
1g 2h
PR unite (30g)
33

Descrizione

## 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il caso di overflow di Master Detail in DataGrid seguendo i passaggi elencati, quindi traccia il comportamento di scroll-into-view per la riga di dettaglio espansa. Il lavoro è completo quando la selezione o il clic sul contenuto della riga di dettaglio non attiva più lo scorrimento, mentre il normale comportamento di scroll-into-view delle celle della tabella rimane invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.