Skip to main content
Version: 13.x (Current)

Dynamic Title

<bk-dynamic-title></bk-dynamic-title>

The Dynamic Title renders a label designed to work as the title of a page. The content of the title is retrieved from a specified field of the first element of the underlying dataset.

The Dynamic Title listens to display-data events to extract the value to show from the payload.

How to configure

The Dynamic Title needs property datasourceKey to be specified, indicating the name of the field to use to extract the content from the first entry.

{
"tag": "bk-dynamic-title",
"properties": {
"datasourceKey": "name"
}
}

Examples

A Dynamic Title configured like

{
"tag": "bk-dynamic-title",
"properties": {
"datasourceKey": "name"
}
}

that receives a display-data event with payload

{
"data": [
{
"name": "John Smith",
"email": "jsmith@test.com",
"budget": 1000
},
{
"name": "Steve Grobb",
"email": "sgrobb@test.com",
"budget": 2000
}
]
}

renders a title with content "John Smith".

API

Properties & Attributes

propertyattributetypedefaultdescription
datasourceKeydatasource-keystring-the field that should be used to pick the data to show.

Listens to

eventaction
display-dataretrieves data to show as content

Emits

None