Skip to main content

data

Optional. Specifies an array of data objects to set into Sidebar

info

Please note that if you specify the id fields in the tree collection, their values should be unique. You can also omit the id fields in the tree collection. In this case they will be generated automatically.

data?: object[];

Example

const sidebar = dhx.Sidebar("sidebar_container", {
data: [
{
"id": "dashboard",
"value": "Dashboard",
"icon": "mdi mdi-view-dashboard"
},
{
"id": "statistics",
"value": "Statistics",
"icon": "mdi mdi-chart-line"
}
]
});