We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b343abb commit 73bb00aCopy full SHA for 73bb00a
packages/react-core/src/helpers/resizeObserver.tsx
@@ -1,4 +1,4 @@
1
-import { canUseDOM } from './util';
+import { canUseDOM, debounce } from './util';
2
3
/**
4
* This function creates a ResizeObserver used to handle resize events for the given containerRef. If ResizeObserver
@@ -83,7 +83,7 @@ export const getResizeObserver = (
83
if (useRequestAnimationFrame) {
84
window.requestAnimationFrame(() => {
85
if (Array.isArray(entries) && entries.length > 0) {
86
- handleResize();
+ debounce(handleResize, 100);
87
}
88
});
89
// Avoid wrapping function in requestAnimationFrame if the function is debounced
0 commit comments