(callback, expandParent)
| 209 | } |
| 210 | |
| 211 | expand(callback, expandParent) { |
| 212 | const done = () => { |
| 213 | if (expandParent) { |
| 214 | let parent = this.parent; |
| 215 | while (parent.level > 0) { |
| 216 | parent.expanded = true; |
| 217 | parent = parent.parent; |
| 218 | } |
| 219 | } |
| 220 | this.expanded = true; |
| 221 | if (callback) callback(); |
| 222 | }; |
| 223 | |
| 224 | if (this.shouldLoadData()) { |
| 225 | this.loadData((data) => { |
| 226 | if (data instanceof Array) { |
| 227 | done(); |
| 228 | } |
| 229 | }); |
| 230 | } else { |
| 231 | done(); |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | doCreateChildren(array, defaultProps = {}) { |
| 236 | array.forEach((item) => { |
no test coverage detected