mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
chore(virtual-scroll): only run detection on individual nodes
This commit is contained in:
@ -481,7 +481,9 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
|
||||
updateNodeContext(nodes, cells, data);
|
||||
|
||||
// ******** DOM WRITE ****************
|
||||
this._cd.detectChanges();
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
(<any>nodes[i].view).detectChanges();
|
||||
}
|
||||
|
||||
// add an element at the end so :last-child css doesn't get messed up
|
||||
// ******** DOM WRITE ****************
|
||||
@ -613,7 +615,9 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
|
||||
updateNodeContext(nodes, cells, data);
|
||||
|
||||
// ******** DOM WRITE ****************
|
||||
this._cd.detectChanges();
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
(<any>nodes[i].view).detectChanges();
|
||||
}
|
||||
|
||||
// ******** DOM WRITE ****************
|
||||
writeToNodes(nodes, cells, this._records.length);
|
||||
|
Reference in New Issue
Block a user