Class

Link

kiss.ux.Link(config)

A Link field allows to link records together by picking a foreign record from a list.

Constructor
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>

View Source client/ux/link/link.js, line 41

this

Example
{
  type: "link",
  id: "customers",
  label: "Customers",
  link: {
     modelId: "customer",
     fieldId: "name"
  },
  multiple: true,
  canCreateRecord: true,
  canLinkRecord: true
}

Methods

# getValue() → {Array.<object>}

Get the field value

View Source client/ux/link/link.js, line 205

  • The field value, which is an array of foreign records
Array.<object>