fix(tree) make change detection less often (#11103)

This commit is contained in:
Stanislav Maxymov
2018-05-03 23:36:38 +03:00
committed by Joey Perrott
parent f130eadb09
commit e59d0fb447
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -607,6 +607,8 @@ describe('CdkTree', () => {
flush();
} catch {
flush();
} finally {
flush();
}
}).toThrowError(getTreeControlFunctionsMissingError().message);
}));
+2 -2
View File
@@ -287,6 +287,8 @@ export class CdkTree<T> implements CollectionViewer, OnInit, OnDestroy {
viewContainer.move(view!, currentIndex);
}
});
this._changeDetectorRef.detectChanges();
}
/**
@@ -336,7 +338,5 @@ export class CdkTree<T> implements CollectionViewer, OnInit, OnDestroy {
if (CdkTreeNode.mostRecentTreeNode) {
CdkTreeNode.mostRecentTreeNode.data = nodeData;
}
this._changeDetectorRef.detectChanges();
}
}