We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c4f599 commit 0f17f16Copy full SHA for 0f17f16
src/demo-app/tree/dynamic-tree-demo/dynamic-database.ts
@@ -100,22 +100,13 @@ export class DynamicDataSource {
100
}
101
node.isLoading = true;
102
103
- let count = 0;
104
-
105
setTimeout(() => {
106
if (expand) {
107
const nodes = children.map(name =>
108
new DynamicFlatNode(name, node.level + 1, this.database.isExpandable(name)));
109
this.data.splice(index + 1, 0, ...nodes);
110
} 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);
+ this.data.splice(index + 1, children.length);
119
120
121
// notify the change
0 commit comments