Fix secondaryLinks field input (#5911)
PR https://github.com/twentyhq/twenty/pull/5785/files broke links update. Also, dropdown "Add link" will be displayed only if a link is already added. Otherwise, it should be a normal input.
This commit is contained in:
@ -151,7 +151,7 @@ export const LinksFieldInput = ({ onCancel }: LinksFieldInputProps) => {
|
||||
<DropdownMenuSeparator />
|
||||
</>
|
||||
)}
|
||||
{isInputDisplayed ? (
|
||||
{isInputDisplayed || !links.length ? (
|
||||
<DropdownMenuInput
|
||||
autoFocus
|
||||
placeholder="URL"
|
||||
|
||||
@ -20,7 +20,7 @@ export const linksCompositeType: CompositeType = {
|
||||
{
|
||||
name: 'secondaryLinks',
|
||||
type: FieldMetadataType.RAW_JSON,
|
||||
hidden: 'input',
|
||||
hidden: false,
|
||||
isRequired: false,
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user