@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.
- package/lib/dts/src/utils/virtualList/virtualList.d.ts.map +1 -1
- package/lib/sanity-ui.js +5 -4
- package/lib/sanity-ui.js.map +1 -1
- package/lib/{sanity-ui.modern.mjs → sanity-ui.modern.js} +6 -5
- package/lib/sanity-ui.modern.js.map +1 -0
- package/lib/sanity-ui.module.js +5 -4
- package/lib/sanity-ui.module.js.map +1 -1
- package/package.json +5 -5
- package/src/utils/virtualList/virtualList.tsx +9 -8
- package/lib/sanity-ui.modern.mjs.map +0 -1
package/lib/sanity-ui.module.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
5822
|
+
ro.unobserve(scrollEl);
|
|
5823
|
+
ro.disconnect();
|
|
5823
5824
|
};
|
|
5824
5825
|
}
|
|
5825
5826
|
|