Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Touch device child filtering fix

Marcus Farrell2a26d58aeb10
diff --git a/packages/ui/src/filter/filter-select.tsx b/packages/ui/src/filter/filter-select.tsx
index 6a985731e5..7b9bcad9dc 100644
--- a/packages/ui/src/filter/filter-select.tsx
+++ b/packages/ui/src/filter/filter-select.tsx
@@ -419,8 +419,6 @@ function FilterButton({
isChecked?: boolean;
onSelect: () => void;
}) {
- const { isMobile } = useMediaQuery();
-
const Icon = option
? option.icon ??
filter.getOptionIcon?.(option.value, { key: filter.key, option }) ??
@@ -438,15 +436,6 @@ function FilterButton({
"flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm",
"data-[selected=true]:bg-neutral-100",
)}
- onPointerDown={(e) => {
- e.preventDefault();
- }}
- onPointerUp={(e) => {
- e.preventDefault();
- // Mobile touches have some sort of delay that can cause the next page's option's
- // onClick / onSelect to be triggered so we delay this by 100ms to account for it
- isMobile ? setTimeout(onSelect, 100) : onSelect();
- }}
onSelect={onSelect}
value={label + option?.value}
>