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

Method closeSiblings

src/tree/Node.jsx:163–170  ·  view source on GitHub ↗
(exclude: any)

Source from the content-addressed store, hash-verified

161 }
162
163 closeSiblings(exclude: any){
164 const {treeNode, nodeModel} = this.props;
165 if (!treeNode.props.accordion) return;
166 if (nodeModel.isLeaf || !nodeModel.childNodes || !nodeModel.childNodes.length) return;
167
168 nodeModel.childNodes.filter(e=> e !== exclude).forEach(e=>e.collapse());
169 this.refresh();
170 }
171
172 refresh(){
173 this.setState({})

Callers 1

handleExpandIconClickMethod · 0.45

Calls 3

refreshMethod · 0.95
collapseMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected