@facter/ds-core 1.14.0 → 1.15.0
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 +17 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3392,6 +3392,23 @@ function CardSelect({
|
|
|
3392
3392
|
setTimeout(() => searchRef.current?.focus(), 0);
|
|
3393
3393
|
}
|
|
3394
3394
|
}, [open, searchable]);
|
|
3395
|
+
React10__namespace.useEffect(() => {
|
|
3396
|
+
const el = listRef.current;
|
|
3397
|
+
if (!el || !open) return;
|
|
3398
|
+
const handleWheel = (e) => {
|
|
3399
|
+
const { scrollTop, scrollHeight, clientHeight } = el;
|
|
3400
|
+
const isScrollable = scrollHeight > clientHeight;
|
|
3401
|
+
if (!isScrollable) return;
|
|
3402
|
+
e.preventDefault();
|
|
3403
|
+
e.stopPropagation();
|
|
3404
|
+
el.scrollTop = Math.max(
|
|
3405
|
+
0,
|
|
3406
|
+
Math.min(scrollTop + e.deltaY, scrollHeight - clientHeight)
|
|
3407
|
+
);
|
|
3408
|
+
};
|
|
3409
|
+
el.addEventListener("wheel", handleWheel, { passive: false, capture: true });
|
|
3410
|
+
return () => el.removeEventListener("wheel", handleWheel, { capture: true });
|
|
3411
|
+
}, [open, filteredOptions]);
|
|
3395
3412
|
const handleScroll = React10__namespace.useCallback(() => {
|
|
3396
3413
|
if (!onLoadMore || !hasMore || loading) return;
|
|
3397
3414
|
const el = listRef.current;
|