@sanity/ui 0.37.18 → 0.37.20

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.
@@ -5810,16 +5810,17 @@ var VirtualList = /*#__PURE__*/forwardRef(function VirtualList(props, ref) {
5810
5810
  scrollEl.addEventListener('scroll', _handleScroll, {
5811
5811
  passive: true
5812
5812
  });
5813
-
5814
- var disposeElementSizeListener = _elementSizeObserver.subscribe(scrollEl, function (scrollElementSize) {
5815
- setScrollHeight(scrollElementSize.content.height);
5813
+ var ro = new _ResizeObserver(function (entries) {
5814
+ setScrollHeight(entries[0].contentRect.height);
5816
5815
  });
5816
+ ro.observe(scrollEl);
5817
5817
 
5818
5818
  _handleScroll();
5819
5819
 
5820
5820
  return function () {
5821
5821
  scrollEl.removeEventListener('scroll', _handleScroll);
5822
- disposeElementSizeListener();
5822
+ ro.unobserve(scrollEl);
5823
+ ro.disconnect();
5823
5824
  };
5824
5825
  }
5825
5826