Beta of segments

UI is not React-based
Segments functionality extended to allow hierarchical rules, negation and more comparisons (regexp).
Added enumerations (see #217)
This commit is contained in:
Tomas Bures 2017-08-19 15:58:23 +02:00
parent f3ff89c536
commit 42338b0afa
3 changed files with 29 additions and 27 deletions

View file

@ -109,10 +109,10 @@ export default class CUD extends Component {
populateRuleDefaults(mutState) {
const ruleHelpers = this.ruleHelpers;
const type = mutState.getIn(['data','type','value']);
const type = mutState.getIn(['type','value']);
if (!ruleHelpers.isCompositeRuleType(type)) {
const column = mutState.getIn(['data', 'column', 'value']);
const column = mutState.getIn(['column', 'value']);
if (column) {
const colType = ruleHelpers.getColumnType(column);
@ -121,7 +121,7 @@ export default class CUD extends Component {
const settings = ruleHelpers.primitiveRuleTypes[colType][type];
if (!settings) {
// The existing rule type does not fit the newly changed column. This resets the rule type chooser to "-- Select ---"
mutState.setIn(['data', 'type', 'value'], '');
mutState.setIn(['type', 'value'], '');
}
}
}