diff --git a/src/visualization/types/SimpleTable/PagedTable.tsx b/src/visualization/types/SimpleTable/PagedTable.tsx index 7319437f60..c1d8f4fada 100644 --- a/src/visualization/types/SimpleTable/PagedTable.tsx +++ b/src/visualization/types/SimpleTable/PagedTable.tsx @@ -239,13 +239,14 @@ const PagedTable: FC = ({result, properties}) => { } let timeout + let animationFrameID const resizer = new ResizeObserver(entries => { if (timeout) { clearTimeout(timeout) } timeout = setTimeout(() => { - requestAnimationFrame(() => { + animationFrameID = requestAnimationFrame(() => { setHeight(entries[0].contentRect.height) }) }, 200) @@ -263,6 +264,7 @@ const PagedTable: FC = ({result, properties}) => { return () => { resizer.disconnect() + cancelAnimationFrame(animationFrameID) if (timeout) { clearTimeout(timeout) }