Allow editor-validation for enum-lists

This commit is contained in:
Lord-Grey
2021-05-05 10:44:53 +02:00
parent 561fabeba6
commit 184cfb1e72
7 changed files with 42 additions and 43 deletions

View File

@@ -1839,7 +1839,7 @@ JSONEditor.AbstractEditor = Class.extend({
this.parent = null;
},
getDefault: function() {
if(this.schema["default"]) return this.schema["default"];
if(this.schema["default"]) return $.i18n(this.schema["default"]);
if(this.schema["enum"]) return this.schema["enum"][0];
var type = this.schema.type || this.schema.oneOf;