MCPcopy Create free account
hub / github.com/Lobos/react-ui / getValue

Function getValue

src/Select.js:87–104  ·  view source on GitHub ↗
(sep=this.props.sep, data=this.state.data)

Source from the content-addressed store, hash-verified

85 }
86
87 getValue (sep=this.props.sep, data=this.state.data) {
88 let value = [],
89 raw = [];
90 data.forEach((d) => {
91 if (d.$checked) {
92 value.push(d.$value);
93 raw.push(d);
94 }
95 });
96
97 if (typeof sep === 'string') {
98 value = value.join(sep);
99 } else if (typeof sep === 'function') {
100 value = sep(raw);
101 }
102
103 return value;
104 }
105
106 setValue (value) {
107 value = toArray(value, this.props.mult ? this.props.sep : null);

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…