@facter/ds-core 1.33.7 → 1.33.9
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/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3522,6 +3522,19 @@ function CardSelect({
|
|
|
3522
3522
|
},
|
|
3523
3523
|
[onSearch]
|
|
3524
3524
|
);
|
|
3525
|
+
React10.useEffect(() => {
|
|
3526
|
+
const el = listRef.current;
|
|
3527
|
+
if (!el || !open) return;
|
|
3528
|
+
const handleWheel = (e) => {
|
|
3529
|
+
const { scrollTop, scrollHeight, clientHeight } = el;
|
|
3530
|
+
if (scrollHeight <= clientHeight) return;
|
|
3531
|
+
e.preventDefault();
|
|
3532
|
+
e.stopPropagation();
|
|
3533
|
+
el.scrollTop = Math.max(0, Math.min(scrollTop + e.deltaY, scrollHeight - clientHeight));
|
|
3534
|
+
};
|
|
3535
|
+
el.addEventListener("wheel", handleWheel, { passive: false, capture: true });
|
|
3536
|
+
return () => el.removeEventListener("wheel", handleWheel, { capture: true });
|
|
3537
|
+
}, [open, filteredOptions]);
|
|
3525
3538
|
const handleScroll = React10.useCallback(() => {
|
|
3526
3539
|
if (!onLoadMore || !hasMore || loading) return;
|
|
3527
3540
|
const el = listRef.current;
|