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

Method closeSiblings

src/tree/Tree.jsx:109–116  ·  view source on GitHub ↗
(exclude: any)

Source from the content-addressed store, hash-verified

107 }
108
109 closeSiblings(exclude: any){
110 const {accordion} = this.props;
111 if (!accordion) return;
112 if (!this.root.childNodes || !this.root.childNodes.length) return;
113
114 this.root.childNodes.filter(e=> e !== exclude).forEach(e=>e.collapse());
115 this.refresh();
116 }
117
118 render(): React.DOM {
119 const {

Callers

nothing calls this directly

Calls 3

refreshMethod · 0.95
collapseMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected