MCPcopy Create free account
hub / github.com/microsoft/SandDance / validateAndSearch

Method validateAndSearch

docs/app/js/sanddance-app.js:12596–12608  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12594 if (!(0, _sanddanceReact.util).deepCompare(this.props.initializer, this.state.initializer)) this.setState(this.getInitialState(this.props));
12595 }
12596 validateAndSearch() {
12597 const groups = [
12598 ...this.state.groups
12599 ];
12600 groups.forEach((group)=>{
12601 group.expressions.forEach(validateExpression);
12602 const errors = group.expressions.reduce((p, c)=>p || c.errorMessage, "");
12603 if (errors) this.setState({
12604 groups
12605 });
12606 else this.props.onSelect(this.state.groups);
12607 });
12608 }
12609 newGroup(key, clause) {
12610 const group = {
12611 key,

Callers 1

renderMethod · 0.95

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected