TreeTable difference between root and data property

Hello,

what is the difference between of the root and data property on the TreeTable Widget. The examples working with root={}, but the TreeEngine uses the data={} property.

Hi @tobias-static-slope,

The root prop of TreeTable expects a full tree, that you can easily find on the widgets showcase. This information later on will be flattened by the TreeTable itself into a flat list, because in the end, TreeTable is still rendering a Table.

While making the TreeEngine, we came by this problem when checking the performance issue and find out that this can cause extra overhead. The mapping has already happens from TreeEngine Redux store to React view, then TreeTable will have to do the similar thing again, which is unnecessary for us. That is why we introduce the data prop, it expects a flattened list and TreeTable will no longer flattern the list on its own but rather render it right away.

Hope it can answer your question :slight_smile:
Tri