diff --git a/src/app/(main)/reports/[reportId]/FieldFilterEditForm.tsx b/src/app/(main)/reports/[reportId]/FieldFilterEditForm.tsx index c1181e72..7bb3ff12 100644 --- a/src/app/(main)/reports/[reportId]/FieldFilterEditForm.tsx +++ b/src/app/(main)/reports/[reportId]/FieldFilterEditForm.tsx @@ -105,9 +105,9 @@ export default function FieldFilterEditForm({ onChange({ name, type, operator, value: isEquals ? selected : value }); }; - const handleMenuSelect = (close: () => void, value: string) => { + const handleMenuSelect = (value: string) => { setSelected(value); - close(); + setShowMenu(false); }; const handleSearch = (value: string) => { @@ -177,7 +177,7 @@ export default function FieldFilterEditForm({ values={filteredValues} type={name} isLoading={isLoading} - onSelect={handleMenuSelect.bind(null, close)} + onSelect={handleMenuSelect} /> )} @@ -202,7 +202,7 @@ const ResultsMenu = ({ values, type, isLoading, onSelect }) => { const { formatValue } = useFormat(); if (isLoading) { return ( - + @@ -216,7 +216,7 @@ const ResultsMenu = ({ values, type, isLoading, onSelect }) => { return ( - {values?.map(value => { + {values?.map((value: any) => { return {formatValue(value, type)}; })}