Skip to content

Commit 87463cc

Browse files
committed
Fix Select selection not working on mobile device - radix fix no longer required
1 parent d8e7fae commit 87463cc

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

apps/dashboard/src/@/components/ui/select.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,7 @@ const SelectContent = React.forwardRef<
7373
>(({ className, children, position = "popper", ...props }, ref) => (
7474
<SelectPrimitive.Portal>
7575
<SelectPrimitive.Content
76-
// Fixes https://github.com/radix-ui/primitives/issues/1658
77-
ref={(instance) => {
78-
if (typeof ref === "function") {
79-
ref(instance);
80-
} else if (ref) {
81-
ref.current = instance;
82-
}
83-
if (!instance) return;
84-
85-
instance.ontouchstart = (e) => {
86-
e.preventDefault();
87-
};
88-
}}
76+
ref={ref}
8977
className={cn(
9078
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
9179
position === "popper" &&

0 commit comments

Comments
 (0)