Component description

The api-table component creates a table with objects, their details, and attributes.

Example

Minimal JSON

{
  "type": "api-table",
  "tableId": "",
  "columns": []
}
{
  "type": "api-table",
  "tableId": "",
  "value": ""
}

JSON 3

{
  "type": "api-table",
  "componentId": "table#`child_objects`",
  "tableId": "table#`child_objects`",
  "filter": {
    "parentObjectId": {
      "value": "@objectId"
    },
    "levels": {
      "value": 1
    }
  },
  "columns": [
    {
      "type": "definedKey",
      "value": "objectName"
    },
    {
      "type": "attributeTypeKey",
      "value": "`core_description`"
    }
  ]
}

Example taken from the core package.

Nested properties

PropertyDescriptionValuesMandatory
typeapi-tablestringYes
tableIdUnique identifier for the API table. Necessary when multiple API tables are created for the same object to ensure the correct columns and filters are applied to each.stringYes
columnsArray of columns in the table.arrayYes* (if no valueproperty)
valueReference to a preconfigured table’s ID to reuse it instead of creating a new table. E.g., MrFavouritesTable.stringYes* (if no column property)
addNewObjectButtonAdds a “New Object” button to an empty table.booleanNo
apiAPI endpoint which provides data for the table. See the full list of available API endpoints.stringNo
bulkEditableEnables bulk edit of one attribute for multiple rows.booleanNo
componentIdUnique ID of a component. If left empty, a random string will be generated. Primarily used in patch packages to define the component's position within the layout (template).stringNo
defaultSortDefault column used to sort the table.jsonNo
exportableEnables export for the table.booleanNo
extraRequestDataDefinition of an external data source and its data to be used in the API table. Used when the API is /api/sql-external/table.jsonNo
filterFilter conditions.arrayNo
hideActionsDetermines whether the API table is a plain static table without any filter, sort, or other actions.booleanNo
objectTypeKeyKey of the object type.stringNo
showAllColumnContentDetermines whether the value in columns is shortened to fit or displayed fully.booleanNo
titleTranslation key of the title. Define the key in translations to specify how the text is displayed in the UI. Unlike the name property, if you use a specific string of text for the title, this text will appear with the package key. For example, Comment Section will be displayed as package_key_comment section.stringNo