@lumx/react 3.11.3-alpha.1 → 3.11.3-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -4588,10 +4588,18 @@ function usePopoverStyle(_ref5) {
4588
4588
  if (!update || !popperElement || !anchorElement || !(WINDOW !== null && WINDOW !== void 0 && WINDOW.ResizeObserver)) {
4589
4589
  return undefined;
4590
4590
  }
4591
- update();
4591
+ let running;
4592
+ function updateRateLimited() {
4593
+ if (running) return;
4594
+ update === null || update === void 0 ? void 0 : update();
4595
+ running = setTimeout(() => {
4596
+ running = undefined;
4597
+ }, 100);
4598
+ }
4599
+ updateRateLimited();
4592
4600
 
4593
4601
  // On anchor or popover resize
4594
- const resizeObserver = new ResizeObserver(update);
4602
+ const resizeObserver = new ResizeObserver(updateRateLimited);
4595
4603
  resizeObserver.observe(anchorElement);
4596
4604
  resizeObserver.observe(popperElement);
4597
4605
  return () => {