mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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.
This commit is contained in:
parent
42a422775e
commit
0a283eacb8
@ -124,6 +124,7 @@
|
|||||||
else this.loadTree(null, updateFn);
|
else this.loadTree(null, updateFn);
|
||||||
},
|
},
|
||||||
setValue: function(val) {
|
setValue: function(val) {
|
||||||
|
this.data('metadata', $.extend(this.data('metadata'), {id: val}));
|
||||||
this.find(':input:hidden').val(val).trigger('change');
|
this.find(':input:hidden').val(val).trigger('change');
|
||||||
},
|
},
|
||||||
getValue: function() {
|
getValue: function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user