Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public updateFilter = (value) => {
const val = value.target ? value.target.value : value;
try {
parseExpr(val);
this.props.update({type: 'filter', expr: val});
} catch (e) {
// TODO: Indicate error in parsing expression.
}
}
public updateFormula = (evt) => {
const props = this.props;
const def = props.def;
const as = evt.target ? evt.target.value : def.as;
const expr = evt.target ? def.expr : evt;
try {
parseExpr(expr);
props.update({type: 'formula', as, expr});
} catch (e) {
// TODO: Indicate error in parsing expression.
}
}