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 53a9747 commit 655c90bCopy full SHA for 655c90b
packages/table/src/store/tree.js
@@ -187,13 +187,14 @@ export default {
187
188
loadData(row, key, treeNode) {
189
const { load } = this.table;
190
- const { lazyTreeNodeMap, treeData } = this.states;
191
- if (load && !treeData[key].loaded) {
192
- treeData[key].loading = true;
+ const { treeData: rawTreeData } = this.states;
+ if (load && !rawTreeData[key].loaded) {
+ rawTreeData[key].loading = true;
193
load(row, treeNode, data => {
194
if (!Array.isArray(data)) {
195
throw new Error('[ElTable] data must be an array');
196
}
197
+ const { lazyTreeNodeMap, treeData } = this.states;
198
treeData[key].loading = false;
199
treeData[key].loaded = true;
200
treeData[key].expanded = true;
0 commit comments