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
| Property | Description | Values | Mandatory |
|---|---|---|---|
type | api-table | string | Yes |
tableId | Unique 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. | string | Yes |
columns | Array of columns in the table. | array | Yes* (if no valueproperty) |
value | Reference to a preconfigured table’s ID to reuse it instead of creating a new table. E.g., MrFavouritesTable. | string | Yes* (if no column property) |
addNewObjectButton | Adds a “New Object” button to an empty table. | boolean | No |
api | API endpoint which provides data for the table. See the full list of available API endpoints. | string | No |
bulkEditable | Enables bulk edit of one attribute for multiple rows. | boolean | No |
componentId | Unique 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). | string | No |
defaultSort | Default column used to sort the table. | json | No |
exportable | Enables export for the table. | boolean | No |
extraRequestData | Definition of an external data source and its data to be used in the API table. Used when the API is /api/sql-external/table. | json | No |
filter | Filter conditions. | array | No |
hideActions | Determines whether the API table is a plain static table without any filter, sort, or other actions. | boolean | No |
objectTypeKey | Key of the object type. | string | No |
showAllColumnContent | Determines whether the value in columns is shortened to fit or displayed fully. | boolean | No |
title | Translation 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. | string | No |