From 316982f129770d252d01fba158f8ace99aa609a0 Mon Sep 17 00:00:00 2001 From: mlevental Date: Tue, 20 Feb 2018 11:55:43 +0100 Subject: [PATCH] editor value updated after manually deleting entries or editing select fields via json --- .../django_admin_json_editor/jsoneditor/jsoneditor.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_admin_json_editor/static/django_admin_json_editor/jsoneditor/jsoneditor.min.js b/django_admin_json_editor/static/django_admin_json_editor/jsoneditor/jsoneditor.min.js index e396783..f24caed 100644 --- a/django_admin_json_editor/static/django_admin_json_editor/jsoneditor/jsoneditor.min.js +++ b/django_admin_json_editor/static/django_admin_json_editor/jsoneditor/jsoneditor.min.js @@ -426,7 +426,7 @@ e?this.canHaveAdditionalProperties()?b?this.addproperty_add.disabled=!1:this.add // First, set the values for all of the defined properties d(this.cached_editors,function(d,e){ // Value explicitly set -"undefined"!=typeof a[d]?(c.addObjectProperty(d),e.setValue(a[d],b)):b||c.isRequired(e)?e.setValue(e.getDefault(),b):c.removeObjectProperty(d)}),d(a,function(a,d){c.cached_editors[a]||(c.addObjectProperty(a),c.editors[a]&&c.editors[a].setValue(d,b))}),this.refreshValue(),this.layoutEditors(),this.onChange()},showValidationErrors:function(a){var b=this,c=[],e=[]; +"undefined"!=typeof a[d]?(c.addObjectProperty(d),e.setValue(a[d],b)):b||c.isRequired(e)?e.setValue(e.getDefault(),b):c.removeObjectProperty(d)}),d(a,function(a,d){c.cached_editors[a]||(c.addObjectProperty(a),c.editors[a]&&c.editors[a].setValue(d,b))}),this.refreshValue(),this.layoutEditors(),this.onChange(),this.change()},showValidationErrors:function(a){var b=this,c=[],e=[]; // Show errors for this editor if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none"; // Show error for the table row if this is inside a table