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

Method removeChildByData

src/tree/model/node.js:198–209  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

196 }
197
198 removeChildByData(data) {
199 let targetNode = null;
200 this.childNodes.forEach(node => {
201 if (node.data === data) {
202 targetNode = node;
203 }
204 });
205
206 if (targetNode) {
207 this.removeChild(targetNode);
208 }
209 }
210
211 expand(callback, expandParent) {
212 const done = () => {

Callers 1

updateChildrenMethod · 0.95

Calls 1

removeChildMethod · 0.95

Tested by

no test coverage detected