Skip to content

Commit 0f17f16

Browse files
authored
Revert "This commit fixes #11148" (#11727)
This reverts commit 0c4f599.
1 parent 0c4f599 commit 0f17f16

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/demo-app/tree/dynamic-tree-demo/dynamic-database.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,22 +100,13 @@ export class DynamicDataSource {
100100
}
101101
node.isLoading = true;
102102

103-
let count = 0;
104-
105103
setTimeout(() => {
106104
if (expand) {
107105
const nodes = children.map(name =>
108106
new DynamicFlatNode(name, node.level + 1, this.database.isExpandable(name)));
109107
this.data.splice(index + 1, 0, ...nodes);
110108
} else {
111-
for (let i = index + 1; i < this.data.length; i++) {
112-
if (this.data[i].level > node.level) {
113-
count++;
114-
} else {
115-
break;
116-
}
117-
}
118-
this.data.splice(index + 1, count);
109+
this.data.splice(index + 1, children.length);
119110
}
120111

121112
// notify the change

0 commit comments

Comments
 (0)