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:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user