From d68af015d7e7a8e9de4895b5f4a787c5742fffc4 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 2 Nov 2020 13:41:43 +0000 Subject: [PATCH 1/2] Revert "Add `scroll-behavior: smooth;` (#2191)" This reverts commit acee66f53409d5f075e12f92267e2f8e79eb8e71. --- style/core.less | 1 - 1 file changed, 1 deletion(-) 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, From 6ddacf151cba10a905cd7e01030982d9f209f060 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 2 Nov 2020 13:42:41 +0000 Subject: [PATCH 2/2] Make scrollToRow smooth --- src/DataGrid.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }));