(callback, defaultProps = {})
| 336 | } |
| 337 | |
| 338 | loadData(callback, defaultProps = {}) { |
| 339 | if (this.store.lazy === true && this.store.load && !this.loaded && !this.loading) { |
| 340 | this.loading = true; |
| 341 | |
| 342 | const resolve = (children) => { |
| 343 | this.loaded = true; |
| 344 | this.loading = false; |
| 345 | this.childNodes = []; |
| 346 | |
| 347 | this.doCreateChildren(children, defaultProps); |
| 348 | |
| 349 | this.updateLeafState(); |
| 350 | if (callback) { |
| 351 | callback.call(this, children); |
| 352 | } |
| 353 | }; |
| 354 | |
| 355 | this.store.load(this, resolve); |
| 356 | } else { |
| 357 | if (callback) { |
| 358 | callback.call(this); |
| 359 | } |
| 360 | } |
| 361 | } |
| 362 | } |
no test coverage detected