Skip to main content

Data Table

Show data in a tabular layout.

Use it to compare a list of items with the same structure.

Example

{
"type": "dataTable",
"extraSettings": {
"clientPagination": false,
"dataSource": "Rest",
"queryUrl": "https://kitsu.io/api/edge/anime?page[limit]={{$pageSize}}&page[offset]={{$start}}&sort=id",
"pageSize": 4,
"path": "data",
"response": {
"total": "meta.count"
},
"columns": [
{
"label": "id",
"accessor": "id",
"maxWidth": 40
},
{
"label": "Name",
"accessor": "attributes.canonicalTitle"
},
{
"label": "Rating",
"width": 60,
"accessor": "attributes.averageRating"
}
]
}
}

Properties

note

This component uses a Data Source.

:::palette-item com.flowable.design:flowable-core-palette,com.flowable.design:flowable-core-palette com/flowable/palette/core.form.palette,com/flowable/palette/form.template.palette cloud-datatable

Configuration Examples

Conditional Formatting Configuration

ConditionCSS classColorBackground color
{{$item.id % 2 === 1}}myOddClass
{{$item.lastName === 'Jackson'}}red#1c98a7

Response Object Configuration

Assuming the following REST Endpoint:

{
"meta":{"count":87},
"next_page":"https://swapi.dev/api/people/?typedText=&page=2",
"previous_page":null,
"results": [
...
]
}

Configuration:

KeyValue
nextnext_page
previousprevious_page
totalmeta.count

Sorting Configuration

To produce: ./api?query=type:USR+sort:asc:type,desc:name

FieldValue
Query URL./api?query=type:USR+sort:{{$sort}}
Sortabletrue
Sort ascending<not set>
Sort descending<not set>
Sort pattern{{$sortItem.direction}}:{{$sortItem.id}}
Sort separator,

To produce: ./users?sortBy=name&sortDirection=ASC

FieldValue
Query URL./users?sortBy={{$sortColumn}}&sortDirection={{$sortDirection}}
Sortabletrue
Sort ascendingASC
Sort descendingDESC
Sort pattern<not set>
Sort separator<not set>

To produce: ./anime?sort=subtype,-averageRating

FieldValue
Query URL./anime?sort={{$sort || 'id'}}
Sortabletrue
Sort ascending<empty>
Sort descending-
Sort pattern{{$sortItem.direction}}{{$sortItem.id}}
Sort separator,

Filter Configuration

To produce: ./anime?sort=id&filter[subtype]=TV&filter[text]=magical

FieldValue
Query URL./anime?sort=id&{{$filter}}
Filterabletrue
Filter patternfilter[{{$filterItem.id}}]={{$filterItem.value}}
Filter separator&

Events

EventWhenAdditionalCancellable
Datatable.dataLoadedDatatable content is loadedDefinition + StateNo
Datatable.nextDatatable Next button is clickedDefinition + StateNo
Datatable.previousDatatable Previous button is clickedDefinition + StateNo
Datatable.sortDatatable column sorting is changedDefinition + State (including sort data)No
Datatable.filterDatatable column filtering is usedDefinition + State (including filters data)No

See section Events for more information.