MCPcopy Create free account
hub / github.com/ElemeFE/element-react / updateLeafState

Method updateLeafState

src/tree/model/node.js:249–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

247 }
248
249 updateLeafState() {
250 if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') {
251 this.isLeaf = this.isLeafByUser;
252 return;
253 }
254 const childNodes = this.childNodes;
255 if (!this.store.lazy || (this.store.lazy === true && this.loaded === true)) {
256 this.isLeaf = !childNodes || childNodes.length === 0;
257 return;
258 }
259 this.isLeaf = false;
260 }
261
262 setChecked(value, deep) {
263 this.indeterminate = value === 'half';

Callers 5

constructorMethod · 0.95
insertChildMethod · 0.95
removeChildMethod · 0.95
updateChildrenMethod · 0.95
resolveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected