# new Link(config)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
config |
object
|
||
link |
object
|
Configuration of the link: |
|
link.modelId |
string
|
Id of the foreign model |
|
link.fieldId |
string
|
Id of the field in the foreign model that will be linked |
|
canCreateRecord |
boolean
|
<optional> |
Set to false to prevent from creating a new foreign record directly from the Link field. Default = true |
canLinkRecord |
boolean
|
<optional> |
Set to false to prevent from linking to a new foreign record directly from the Link field. Default = true |
canDeleteLinks |
boolean
|
<optional> |
Set to false to prevent from deleting links directly from the Link field. Default = true |
multiple |
boolean
|
<optional> |
True to enable multi-select |
linkStyle |
boolean
|
<optional> |
"default" or "compact" |
label |
string
|
<optional> |
|
labelWidth |
string
|
<optional> |
|
labelPosition |
string
|
<optional> |
left | right | top | bottom |
labelAlign |
string
|
<optional> |
left | right |
readOnly |
boolean
|
<optional> |
|
margin |
string
|
<optional> |
|
padding |
string
|
<optional> |
|
width |
string
|
number
|
<optional> |
|
minWidth |
string
|
number
|
<optional> |
|
height |
string
|
number
|
<optional> |
this
Example
{
type: "link",
id: "customers",
label: "Customers",
link: {
modelId: "customer",
fieldId: "name"
},
multiple: true,
canCreateRecord: true,
canLinkRecord: true
}