Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix combobox filter

Carl-Gerhard Lindesvärdba381636a0c6
diff --git a/apps/dashboard/src/components/ui/combobox.tsx b/apps/dashboard/src/components/ui/combobox.tsx
index 03bdb5b41..8a6a8e48a 100644
--- a/apps/dashboard/src/components/ui/combobox.tsx
+++ b/apps/dashboard/src/components/ui/combobox.tsx
@@ -100,7 +100,7 @@ export function Combobox<T extends string>({
align={align}
portal={portal}
>
- <Command>
+ <Command shouldFilter={false}>
{searchable === true && (
<CommandInput
placeholder="Search item..."
@@ -125,7 +125,10 @@ export function Combobox<T extends string>({
)}
<VirtualList
height={300}
- data={items}
+ data={items.filter((item) => {
+ if (search === '') return true;
+ return item.label.toLowerCase().includes(search.toLowerCase());
+ })}
itemHeight={32}
itemKey="value"
className="min-w-60"