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.

Fix Filter.Select losing input focus on button click

Tim Wilson52a23c8bb321
diff --git a/packages/ui/src/filter/filter-select.tsx b/packages/ui/src/filter/filter-select.tsx
index 763e3267b3..807ba6e478 100644
--- a/packages/ui/src/filter/filter-select.tsx
+++ b/packages/ui/src/filter/filter-select.tsx
@@ -364,7 +364,12 @@ 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-gray-100",
)}
- onSelect={onSelect}
+ onPointerDown={(e) => {
+ e.preventDefault();
+ }}
+ onPointerUp={(e) => {
+ onSelect();
+ }}
value={label}
>
<span className="shrink-0 text-gray-600">