From 3845d9951cbd23de1a1c610ce751b1e4799538a4 Mon Sep 17 00:00:00 2001 From: Robert Isaacs Date: Fri, 10 Jan 2025 08:37:20 -0500 Subject: [PATCH] fix: company picker merge issues (#169) --- .../components/companies/CompanyPicker.tsx | 132 ++++++++++-------- 1 file changed, 70 insertions(+), 62 deletions(-) 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 => ( - - )) - )} -
+ )}
);