diff --git a/src/DataGrid.tsx b/src/DataGrid.tsx index 67e0d317ba..e806cdccd4 100644 --- a/src/DataGrid.tsx +++ b/src/DataGrid.tsx @@ -354,7 +354,10 @@ function DataGrid({ scrollToRow(rowIdx: number) { const { current } = gridRef; if (!current) return; - current.scrollTop = rowIdx * rowHeight; + current.scrollTo({ + top: rowIdx * rowHeight, + behavior: 'smooth' + }); }, selectCell })); diff --git a/style/core.less b/style/core.less index 4dd72918cd..c4a6667c35 100644 --- a/style/core.less +++ b/style/core.less @@ -54,7 +54,6 @@ background-color: var(--background-color); color: var(--color); font-size: var(--font-size); - scroll-behavior: smooth; *, *::before,