diff --git a/server/src/components/companies/CompanyPicker.tsx b/server/src/components/companies/CompanyPicker.tsx index ef9d7152..b55b461f 100644 --- a/server/src/components/companies/CompanyPicker.tsx +++ b/server/src/components/companies/CompanyPicker.tsx @@ -141,73 +141,81 @@ export const CompanyPicker: React.FC = ({ type="button" onClick={() => setIsOpen(!isOpen)} className="w-full p-2 border-2 border-gray-200 rounded-md flex justify-between items-center text-left outline-none transition-colors duration-200 hover:border-gray-300 focus:border-purple-500 bg-white" - /> -
-
-
- -
-
- + > + {selectedCompany ? selectedCompany.company_name : 'Select Client'} + + + + {isOpen && ( +
e.stopPropagation()} + > +
+
+
+ +
+
+ +
+
+ { + e.stopPropagation(); + setSearchTerm(e.target.value); + }} + /> +
- {filteredCompanies.map((company): JSX.Element => ( - - ))} + {filteredCompanies.length === 0 ? ( +
No clients found
+ ) : ( + filteredCompanies.map((company): JSX.Element => ( + + )) + )}
-
- {filteredCompanies.length === 0 ? ( -
No clients found
- ) : ( - filteredCompanies.map((company): JSX.Element => ( - - )) - )} -
+ )}
);