Skip to content

Commit

Permalink
perf(virt-scroll): better management of animation frames
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Jan 11, 2023
1 parent e644cc8 commit 7df403d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/src/components/virtual-scroll/use-virtual-scroll.js
Expand Up @@ -24,12 +24,16 @@ const setOverflowAnchor = __QUASAR_SSR__ || window.getComputedStyle(document.bod
return
}

cancelAnimationFrame(contentEl._qOverflowAnimationFrame)
if (contentEl._qOverflowAnimationFrame !== void 0) {
cancelAnimationFrame(contentEl._qOverflowAnimationFrame)
}

contentEl._qOverflowAnimationFrame = requestAnimationFrame(() => {
if (contentEl === null) {
return
}

contentEl._qOverflowAnimationFrame = void 0
const children = contentEl.children || []

filterProto
Expand Down

0 comments on commit 7df403d

Please sign in to comment.