Fixed single record picker missing dropdown separator (#12672)
This PR fixes a missing dropdown menu separator when no result found in a single record picker. Before :  After : <img width="233" alt="image" src="https://github.com/user-attachments/assets/73919d63-3126-4b56-b335-34d3c9d6ac15" /> Fixes https://github.com/twentyhq/twenty/issues/12665
This commit is contained in:
@ -82,11 +82,13 @@ export const SingleRecordPickerMenuItemsWithSearch = ({
|
||||
{layoutDirection === 'search-bar-on-bottom' && (
|
||||
<>
|
||||
{isDefined(onCreate) && hasObjectUpdatePermissions && (
|
||||
<DropdownMenuItemsContainer scrollable={false}>
|
||||
{createNewButton}
|
||||
</DropdownMenuItemsContainer>
|
||||
<>
|
||||
<DropdownMenuItemsContainer scrollable={false}>
|
||||
{createNewButton}
|
||||
</DropdownMenuItemsContainer>
|
||||
<DropdownMenuSeparator />
|
||||
</>
|
||||
)}
|
||||
{records.recordsToSelect.length > 0 && <DropdownMenuSeparator />}
|
||||
<SingleRecordPickerMenuItems
|
||||
recordsToSelect={records.recordsToSelect}
|
||||
loading={records.loading}
|
||||
@ -122,13 +124,13 @@ export const SingleRecordPickerMenuItemsWithSearch = ({
|
||||
onRecordSelected,
|
||||
}}
|
||||
/>
|
||||
{records.recordsToSelect.length > 0 && isDefined(onCreate) && (
|
||||
<DropdownMenuSeparator />
|
||||
)}
|
||||
{isDefined(onCreate) && hasObjectUpdatePermissions && (
|
||||
<DropdownMenuItemsContainer scrollable={false}>
|
||||
{createNewButton}
|
||||
</DropdownMenuItemsContainer>
|
||||
<>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItemsContainer scrollable={false}>
|
||||
{createNewButton}
|
||||
</DropdownMenuItemsContainer>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user