Permalink
Browse files

FIX Unset internal metadata on TreeDropdownField setValue()

Otherwise the hidden field value and metadata will get out of sync.
Most commonly used together with setTitle('') as well.
  • Loading branch information...
1 parent 42a4227 commit 0a283eacb8bf741d479dee919e2afb8eb5fb210a @chillu chillu committed Mar 25, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 javascript/TreeDropdownField.js
@@ -124,6 +124,7 @@
else this.loadTree(null, updateFn);
},
setValue: function(val) {
+ this.data('metadata', $.extend(this.data('metadata'), {id: val}));
this.find(':input:hidden').val(val).trigger('change');
},
getValue: function() {

0 comments on commit 0a283ea

Please sign in to comment.