react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

Add ability to smoothly scroll to column or cell

Open pwang347 opened this issue 2 years ago • 0 comments

Use case

We have added a column search component to our grid to smoothly scroll to the column or cell using the index. This is achieved currently by using the computed column widths, but it would be great to have this built-in the grid and to support this for cells in arbitrary x,y positions. Smooth scrolling makes the experience much less jumpy and provides the users with a sense of directionality of where the new screen position is.

Proposed solution

There is currently the scrollToCell API in the DataGridHandle interface. It would be good if we could add an option to smoothly scroll. As mentioned above, one possible way to implement this could be to leverage native browser scrolling APIs in conjunction with the calculated column widths and cell heights.

pwang347 avatar Aug 14 '23 23:08 pwang347