Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleChange(field, e) {
const newVertex = {...this.state.vertex};
dot.set(field, e.target.value, newVertex);
this.setState({vertex: newVertex});
return newVertex;
}
fields.forEach(({ name, ref, path, clearValue }) => {
if (clearValue) {
return clearValue(ref, data[name]);
}
return dot.set(path, data[name] ? data[name] : '', ref as object);
});
}