| 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, |