Source of demo: treetable/run.astro.
Model: generateTreePeopleModel.ts.
Data: treePeopleData.ts.
This example demonstrates a Tree-Table. In a Tree-Table, objects are in a hierarchical relationship to each other and typically belong to the same type, making a tabulated representation alongside a tree structure in the first column meaningful.
Additionally, in this example, we showcase how to set up a multi-range selection using JavaScript.
The data is in JSON format and represents an array of person objects. Some individuals are associated with friends through the ‘friends’ property. It constitutes a hierarchical object structure.
Firstly, this model is converted into an array of TreeRowIfTableFactory.createTableModel()
.
The ColumnDefIf[]
defines the columns in this process.
The column definition looks like this: