MCPcopy
hub / github.com/duxianwei520/react / setNewFatherChecked

Method setNewFatherChecked

app/pages/set/roleManage/roleModuleList.js:170–180  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

168
169 // 将父级树结构全部勾选
170 setNewFatherChecked(id) {
171 const { checkedIds } = this.state;
172 if (this.forAllData[id]) {
173 const { parentId } = this.forAllData[id];
174 if (parentId && !this.onInArray(parentId, checkedIds)) {
175 checkedIds.push(parentId);
176 this.setNewFatherChecked(parentId);
177 }
178 }
179 return checkedIds;
180 }
181
182 // 把某一选中元素的子集全部设为不选中
183 setChildsUnChecked = (obj, results) => {

Callers 1

appClass · 0.95

Calls 1

onInArrayMethod · 0.95

Tested by

no test coverage detected