From a81af1ce349a0a0616a9906303b511956817684a Mon Sep 17 00:00:00 2001 From: David Tsay <3614296+davetsay@users.noreply.github.com> Date: Tue, 31 Mar 2020 21:04:52 -0700 Subject: [PATCH] check format first (#2851) default to number --- src/plugins/condition/components/Criterion.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/condition/components/Criterion.vue b/src/plugins/condition/components/Criterion.vue index 287b83127f..b9ce99604f 100644 --- a/src/plugins/condition/components/Criterion.vue +++ b/src/plugins/condition/components/Criterion.vue @@ -201,6 +201,8 @@ export default { if (foundMetadata.enumerations !== undefined) { this.operationFormat = 'enum'; this.enumerations = foundMetadata.enumerations; + } else if (foundMetadata.format === 'string' || foundMetadata.format === 'number') { + this.operationFormat = foundMetadata.format; } else if (foundMetadata.hints.hasOwnProperty('range')) { this.operationFormat = 'number'; } else if (foundMetadata.hints.hasOwnProperty('domain')) { @@ -208,7 +210,7 @@ export default { } else if (foundMetadata.key === 'name') { this.operationFormat = 'string'; } else { - this.operationFormat = 'string'; + this.operationFormat = 'number'; } } this.updateInputVisibilityAndValues();