MCPcopy Index your code
hub / github.com/flyfloor/react-component / formatValue

Function formatValue

component/DropDown.js:53–66  ·  view source on GitHub ↗
(val, callback)

Source from the content-addressed store, hash-verified

51 },
52
53 formatValue(val, callback){
54 let newVal = val, oldVal = this.state.value;
55
56 if (this.props.multi) {
57 let index = oldVal.indexOf(val);
58 if (index > -1) {
59 oldVal.splice(index, 1);
60 this.setState({ value: oldVal }, callback);
61 return;
62 }
63 newVal = oldVal.concat(val);
64 }
65 this.setState({ value: newVal}, callback);
66 },
67
68 formatYieldChildren(children){
69 let {labelName, searchable, valueName, placeHolder, multi, style, className} = this.props;

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…