Skip to content

Commit b5ff815

Browse files
Merge pull request #2379 from RedisInsight/fe/feature/RI-4671-scroll-wb
#RI-4671 - fix scroll in wb
2 parents 1a9a965 + 7bec083 commit b5ff815

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

redisinsight/ui/src/pages/workbench/components/wb-view/WBViewWrapper.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,12 @@ const WBViewWrapper = () => {
245245
}
246246

247247
const scrollResults = (inline: ScrollLogicalPosition = 'start') => {
248-
scrollIntoView(scrollDivRef?.current, {
249-
behavior: 'smooth',
250-
block: 'nearest',
251-
inline,
248+
requestAnimationFrame(() => {
249+
scrollIntoView(scrollDivRef?.current, {
250+
behavior: 'smooth',
251+
block: 'nearest',
252+
inline,
253+
})
252254
})
253255
}
254256

0 commit comments

Comments
 (0)