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.
This commit is contained in:
AmirReza Jamali
2026-04-13 19:27:22 +03:30
parent 8e86b8f894
commit c93a1ffe8d
5 changed files with 30 additions and 6 deletions
+5 -1
View File
@@ -115,7 +115,11 @@ export function Select<T extends FieldValues>({
clearable && value && "pr-20",
)}
>
{placeholder && <option value="">{placeholder}</option>}
{placeholder && (
<option value="" disabled>
{placeholder}
</option>
)}
{items.map((item) => (
<option key={item.value} value={item.value}>