Closed
Description
Here's the code to create FlatTreeControl:
this.treeControl = new FlatTreeControl<GeoEntityFlatNode>(
(node) => node.nodeLevel,
(node) => node.expandable,
{ trackBy: this.trackByGroupPath } // ========> DOES NOT COMPILE
);
and the trackByGroupPath
:
trackByGroupPath(index: number, node: GeoEntityFlatNode): string {
return node.groupPath;
}
And this whole thing does not compile as
Type '(node: GeoEntityFlatNode) => string' is not assignable to type '(dataNode: GeoEntityFlatNode) => GeoEntityFlatNode'.
Am I missing something or this makes trackBy
completely useless?