From c93a1ffe8d82c4317e60e9985da5b52d7f9483e4 Mon Sep 17 00:00:00 2001 From: AmirReza Jamali Date: Mon, 13 Apr 2026 19:27:22 +0330 Subject: [PATCH] refactor(Select, AssignToCompanyModalContent): enhance select placeholder and integrate company query - Updated the Select component to disable the placeholder option for better user experience. - Refactored AssignToCompanyModalContent to accept a companiesQuery prop, improving data handling. - Adjusted the useCustomerListPresenter hook to include the company query, ensuring it is only enabled when the assign company modal is open. - Enhanced the CustomersTable component to pass the company query to the modal content. --- src/components/FormElements/select.tsx | 6 +++++- .../customers/AssignToCompanyModalContent.tsx | 18 ++++++++++++++---- src/components/Tables/customers/index.tsx | 3 +++ .../customers/useCustomerListPresenter.ts | 5 +++++ src/hooks/queries/useCompaniesQueries.ts | 4 +++- 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/components/FormElements/select.tsx b/src/components/FormElements/select.tsx index d57662a..5c965e0 100644 --- a/src/components/FormElements/select.tsx +++ b/src/components/FormElements/select.tsx @@ -115,7 +115,11 @@ export function Select({ clearable && value && "pr-20", )} > - {placeholder && } + {placeholder && ( + + )} {items.map((item) => (