Skip to content

Commit

Permalink
fix(module:tree-view): trigger markforcheck after nodes changed (#7426)
Browse files Browse the repository at this point in the history
  • Loading branch information
simplejason committed May 12, 2022
1 parent 1a9a2dd commit a702674
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/tree-view/tree-virtual-scroll-view.ts
Expand Up @@ -77,6 +77,7 @@ export class NzTreeVirtualScrollViewComponent<T> extends NzTreeView<T> implement
override renderNodeChanges(data: T[] | readonly T[]): void {
this.nodes = new Array(...data).map((n, i) => this.createNode(n, i));
this._dataSourceChanged.next();
this.changeDetectorRef.markForCheck();
}

private createNode(nodeData: T, index: number): NzTreeVirtualNodeData<T> {
Expand Down

0 comments on commit a702674

Please sign in to comment.