MCPcopy Create free account
hub / github.com/flyfloor/react-component / addVal

Function addVal

component/CheckBoxGroup.js:30–44  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

28 },
29
30 addVal(val){
31 let flag = false;
32 const {value} = this.state;
33 for (let i = 0; i < value.length; i++) {
34 if (val === value[i]){
35 flag = true;
36 break;
37 }
38 }
39 if (!flag) {
40 this.setState({
41 value: value.concat(val)
42 }, this.valueChange);
43 }
44 },
45
46 removeVal(val){
47 let index = this.state.value.indexOf(val);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…