From b6b5cfe403b94e2f445b71985fc4c60a6a41dcc4 Mon Sep 17 00:00:00 2001 From: Joel McKinnon Date: Thu, 13 Feb 2020 10:52:37 -0800 Subject: [PATCH] fixed default state of output selector --- src/plugins/condition/components/Condition.vue | 13 +++++++------ .../condition/components/ConditionCollection.vue | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/plugins/condition/components/Condition.vue b/src/plugins/condition/components/Condition.vue index 8d989f3cd0..f00dcf7987 100644 --- a/src/plugins/condition/components/Condition.vue +++ b/src/plugins/condition/components/Condition.vue @@ -183,6 +183,11 @@ export default { outputOptions: ['false', 'true', 'string'] }; }, + computed: { + initCap: function (string) { + return string.charAt(0).toUpperCase() + string.slice(1) + } + }, destroyed() { this.destroy(); }, @@ -227,12 +232,6 @@ export default { delete this.conditionClass; } }, - reset() { - this.selectedMetadataKey = {}; - this.selectedTelemetryKey = {}; - this.selectedOperationKey = {}; - this.operationValue = {}; - }, handleConditionResult(args) { this.$emit('conditionResultUpdated', { id: this.conditionIdentifier, @@ -256,6 +255,8 @@ export default { } else { this.selectedOutputKey = conditionOutput; } + } else { + this.selectedOutputKey = ''; } }, persist() { diff --git a/src/plugins/condition/components/ConditionCollection.vue b/src/plugins/condition/components/ConditionCollection.vue index 83c0e21438..d41ed07ee3 100644 --- a/src/plugins/condition/components/ConditionCollection.vue +++ b/src/plugins/condition/components/ConditionCollection.vue @@ -227,7 +227,7 @@ export default { }, configuration: { name: isDefault ? 'Default' : 'Unnamed Condition', - output: 'false', + output: '', trigger: 'any', criteria: isDefault ? [] : [{ telemetry: '',