mirror of
https://github.com/lingble/twenty.git
synced 2025-11-01 21:27:58 +00:00
Fixed dropdown menu field settings (#8374)
2 dropdown menu components were used. Using only one and using dropdown props for passing width to its internal dropdown menu component.
This commit is contained in:
@@ -9,7 +9,6 @@ import {
|
|||||||
} from 'twenty-ui';
|
} from 'twenty-ui';
|
||||||
|
|
||||||
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
||||||
import { DropdownMenu } from '@/ui/layout/dropdown/components/DropdownMenu';
|
|
||||||
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
||||||
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
|
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
|
||||||
|
|
||||||
@@ -57,30 +56,29 @@ export const SettingsObjectFieldActiveActionDropdown = ({
|
|||||||
accent="tertiary"
|
accent="tertiary"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
dropdownMenuWidth={160}
|
||||||
dropdownComponents={
|
dropdownComponents={
|
||||||
<DropdownMenu width="160px">
|
<DropdownMenuItemsContainer>
|
||||||
<DropdownMenuItemsContainer>
|
<MenuItem
|
||||||
|
text={isCustomField ? 'Edit' : 'View'}
|
||||||
|
LeftIcon={isCustomField ? IconPencil : IconEye}
|
||||||
|
onClick={handleEdit}
|
||||||
|
/>
|
||||||
|
{!!onSetAsLabelIdentifier && (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
text={isCustomField ? 'Edit' : 'View'}
|
text="Set as record text"
|
||||||
LeftIcon={isCustomField ? IconPencil : IconEye}
|
LeftIcon={IconTextSize}
|
||||||
onClick={handleEdit}
|
onClick={handleSetAsLabelIdentifier}
|
||||||
/>
|
/>
|
||||||
{!!onSetAsLabelIdentifier && (
|
)}
|
||||||
<MenuItem
|
{!!onDeactivate && (
|
||||||
text="Set as record text"
|
<MenuItem
|
||||||
LeftIcon={IconTextSize}
|
text="Deactivate"
|
||||||
onClick={handleSetAsLabelIdentifier}
|
LeftIcon={IconArchive}
|
||||||
/>
|
onClick={handleDeactivate}
|
||||||
)}
|
/>
|
||||||
{!!onDeactivate && (
|
)}
|
||||||
<MenuItem
|
</DropdownMenuItemsContainer>
|
||||||
text="Deactivate"
|
|
||||||
LeftIcon={IconArchive}
|
|
||||||
onClick={handleDeactivate}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</DropdownMenuItemsContainer>
|
|
||||||
</DropdownMenu>
|
|
||||||
}
|
}
|
||||||
dropdownHotkeyScope={{
|
dropdownHotkeyScope={{
|
||||||
scope: dropdownId,
|
scope: dropdownId,
|
||||||
|
|||||||
Reference in New Issue
Block a user