@facter/ds-core 1.12.0 → 1.13.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 +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3389,6 +3389,12 @@ function CardSelect({
|
|
|
3389
3389
|
setTimeout(() => searchRef.current?.focus(), 0);
|
|
3390
3390
|
}
|
|
3391
3391
|
}, [open, searchable]);
|
|
3392
|
+
const handleWheel = React10__namespace.useCallback((e) => {
|
|
3393
|
+
e.stopPropagation();
|
|
3394
|
+
const el = listRef.current;
|
|
3395
|
+
if (!el) return;
|
|
3396
|
+
el.scrollTop += e.deltaY;
|
|
3397
|
+
}, []);
|
|
3392
3398
|
const handleScroll = React10__namespace.useCallback(() => {
|
|
3393
3399
|
if (!onLoadMore || !hasMore || loading) return;
|
|
3394
3400
|
const el = listRef.current;
|
|
@@ -3441,8 +3447,7 @@ function CardSelect({
|
|
|
3441
3447
|
align: "start",
|
|
3442
3448
|
className: "p-0 overflow-hidden",
|
|
3443
3449
|
style: {
|
|
3444
|
-
width: "var(--radix-popover-trigger-width)"
|
|
3445
|
-
maxHeight: "var(--radix-popover-content-available-height)"
|
|
3450
|
+
width: "var(--radix-popover-trigger-width)"
|
|
3446
3451
|
},
|
|
3447
3452
|
children: [
|
|
3448
3453
|
searchable && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-3 py-2 border-b border-border", children: [
|
|
@@ -3463,9 +3468,9 @@ function CardSelect({
|
|
|
3463
3468
|
"div",
|
|
3464
3469
|
{
|
|
3465
3470
|
ref: listRef,
|
|
3466
|
-
className: "overflow-y-auto overscroll-contain",
|
|
3467
|
-
style: { maxHeight: searchable ? "calc(var(--radix-popover-content-available-height) - 45px)" : "var(--radix-popover-content-available-height)" },
|
|
3471
|
+
className: "overflow-y-auto overscroll-contain max-h-[300px]",
|
|
3468
3472
|
onScroll: handleScroll,
|
|
3473
|
+
onWheel: handleWheel,
|
|
3469
3474
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "divide-y divide-border/50 p-2", children: [
|
|
3470
3475
|
filteredOptions.length === 0 && !loading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-4 text-center text-sm text-muted-foreground", children: emptyText }) : filteredOptions.map((option) => {
|
|
3471
3476
|
const isSelected = value === option.value;
|