From 5792cd33505c946deb42af168be955f6914b20fc Mon Sep 17 00:00:00 2001 From: Felix Ranesberger <52704891+felixranesberger@users.noreply.github.com> Date: Thu, 19 Oct 2023 19:42:14 +0200 Subject: [PATCH] fix: decrease debounce resize timer --- packages/core/src/lazyLoad.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/lazyLoad.ts b/packages/core/src/lazyLoad.ts index 0d721c7..fae049e 100644 --- a/packages/core/src/lazyLoad.ts +++ b/packages/core/src/lazyLoad.ts @@ -201,7 +201,7 @@ function updateSizesAttribute( if (options?.updateOnResize) { if (!resizeElementStore.has(element)) { - const debounceResize = debounce(() => updateSizesAttribute(element), 500) + const debounceResize = debounce(() => updateSizesAttribute(element), 200) const observerInstance = new ResizeObserver(debounceResize) resizeElementStore.set(element, observerInstance) observerInstance.observe(element)