wip: addressing review comments

This commit is contained in:
Joel McKinnon 2020-02-27 16:32:38 -08:00
parent 467c57b7c6
commit 1a409afb03
3 changed files with 12 additions and 14 deletions

View File

@ -277,6 +277,7 @@ export default {
} else {
this.domainObject.configuration.output = this.selectedOutputKey;
}
this.persist();
},
updateCurrentCondition() {
this.$emit('updateCurrentCondition', this.currentConditionIdentifier);

View File

@ -44,19 +44,16 @@
{{ option.text }}
</option>
</select>
<input v-if="inputCount > 0"
v-model="criterion.input[0]"
class="t-condition-name-input"
type="text"
@blur="persist"
>
<span v-if="inputCount === 2">and</span>
<input v-if="inputCount === 2"
v-model="criterion.input[1]"
class="t-condition-name-input"
type="text"
@blur="persist"
<span v-for="(item, inputIndex) in Array, inputCount"
:key="inputIndex"
>
<input v-model="criterion.input[inputIndex]"
class="t-condition-name-input"
type="text"
@blur="persist"
>
<span v-if="inputIndex < inputCount-1">and</span>
</span>
</span>
</span>
</li>

View File

@ -76,8 +76,8 @@ export default class TelemetryCriterion extends EventEmitter {
let params = [];
let result = false;
params.push(data[this.metadata]);
if (this.input.length) {
this.input.forEach(input => {params.push(this.input[0])});
if (this.input instanceof Array && this.input.length) {
this.input.forEach((input) => {params.push(input)});
}
if (typeof comparator === 'function') {
result = comparator(params);