From 04c4daec7aafecee80381192558100352b57c9ab Mon Sep 17 00:00:00 2001 From: Marcell Toth Date: Wed, 29 Apr 2020 14:57:13 +0300 Subject: [PATCH] fix: remove scrollbar-flicker (#153) Makes the ScrollContainer 1px smaller than the available size. This mitigates the rounding errors that cause the flicker. --- src/ScrollContainer/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ScrollContainer/index.tsx b/src/ScrollContainer/index.tsx index 262649be..a6e40b1d 100644 --- a/src/ScrollContainer/index.tsx +++ b/src/ScrollContainer/index.tsx @@ -142,7 +142,11 @@ const ScrollContainer = React.forwardRef if (autosize) { return ( - {({ height, width }) =>
{ScrollElem}
} + {({ height, width }) => ( +
+ {ScrollElem} +
+ )}
); }