Skip to content

Commit

Permalink
Fix secondaryLinks field input (twentyhq#5911)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thomtrp authored Jun 17, 2024
1 parent 73d6017 commit 886bf79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const LinksFieldInput = ({ onCancel }: LinksFieldInputProps) => {
<DropdownMenuSeparator />
</>
)}
{isInputDisplayed ? (
{isInputDisplayed || !links.length ? (
<DropdownMenuInput
autoFocus
placeholder="URL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const linksCompositeType: CompositeType = {
{
name: 'secondaryLinks',
type: FieldMetadataType.RAW_JSON,
hidden: 'input',
hidden: false,
isRequired: false,
},
],
Expand Down

0 comments on commit 886bf79

Please sign in to comment.