fixed default state of output selector

This commit is contained in:
Joel McKinnon 2020-02-13 10:52:37 -08:00
parent b6ce9c6ed7
commit b6b5cfe403
2 changed files with 8 additions and 7 deletions

View File

@ -183,6 +183,11 @@ export default {
outputOptions: ['false', 'true', 'string'] outputOptions: ['false', 'true', 'string']
}; };
}, },
computed: {
initCap: function (string) {
return string.charAt(0).toUpperCase() + string.slice(1)
}
},
destroyed() { destroyed() {
this.destroy(); this.destroy();
}, },
@ -227,12 +232,6 @@ export default {
delete this.conditionClass; delete this.conditionClass;
} }
}, },
reset() {
this.selectedMetadataKey = {};
this.selectedTelemetryKey = {};
this.selectedOperationKey = {};
this.operationValue = {};
},
handleConditionResult(args) { handleConditionResult(args) {
this.$emit('conditionResultUpdated', { this.$emit('conditionResultUpdated', {
id: this.conditionIdentifier, id: this.conditionIdentifier,
@ -256,6 +255,8 @@ export default {
} else { } else {
this.selectedOutputKey = conditionOutput; this.selectedOutputKey = conditionOutput;
} }
} else {
this.selectedOutputKey = '';
} }
}, },
persist() { persist() {

View File

@ -227,7 +227,7 @@ export default {
}, },
configuration: { configuration: {
name: isDefault ? 'Default' : 'Unnamed Condition', name: isDefault ? 'Default' : 'Unnamed Condition',
output: 'false', output: '',
trigger: 'any', trigger: 'any',
criteria: isDefault ? [] : [{ criteria: isDefault ? [] : [{
telemetry: '', telemetry: '',