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:
Thomas Trompette
2024-06-17 18:09:46 +02:00
committed by GitHub
parent e1bd3a4c5a
commit de2b0527a3
2 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ export const LinksFieldInput = ({ onCancel }: LinksFieldInputProps) => {
<DropdownMenuSeparator /> <DropdownMenuSeparator />
</> </>
)} )}
{isInputDisplayed ? ( {isInputDisplayed || !links.length ? (
<DropdownMenuInput <DropdownMenuInput
autoFocus autoFocus
placeholder="URL" placeholder="URL"

View File

@ -20,7 +20,7 @@ export const linksCompositeType: CompositeType = {
{ {
name: 'secondaryLinks', name: 'secondaryLinks',
type: FieldMetadataType.RAW_JSON, type: FieldMetadataType.RAW_JSON,
hidden: 'input', hidden: false,
isRequired: false, isRequired: false,
}, },
], ],