(groupIndex)
| 12657 | return ex; |
| 12658 | } |
| 12659 | addExpression(groupIndex) { |
| 12660 | const groups = [ |
| 12661 | ...this.state.groups |
| 12662 | ]; |
| 12663 | const group = groups[groupIndex]; |
| 12664 | const maxKey = group.expressions.reduce((max, p)=>p.key > max ? p.key : max, group.expressions[0].key); |
| 12665 | const newEx = this.newExpression(maxKey + 1, "&&"); |
| 12666 | group.expressions.push(newEx); |
| 12667 | if (group.expressions.length === 2) newEx.unlocked = true; |
| 12668 | else { |
| 12669 | group.expressions.forEach((ex)=>ex.unlocked = false); |
| 12670 | newEx.clause = group.expressions[1].clause; |
| 12671 | } |
| 12672 | this.setState({ |
| 12673 | groups |
| 12674 | }); |
| 12675 | } |
| 12676 | updateExpression(partialEx, groupIndex, index) { |
| 12677 | const groups = [ |
| 12678 | ...this.state.groups |
no test coverage detected