mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Don't reload TreeDropdownField title via ajax if no value is set (which causes infinite loops)
This commit is contained in:
parent
6ffb941c28
commit
5f635d8315
@ -118,7 +118,7 @@
|
||||
* Update title from tree node value
|
||||
*/
|
||||
updateTitle: function() {
|
||||
var self = this, tree = self.find('.tree-holder');
|
||||
var self = this, tree = self.find('.tree-holder'), val = this.getValue();
|
||||
var updateFn = function() {
|
||||
var val = self.getValue();
|
||||
if(val) {
|
||||
@ -131,7 +131,7 @@
|
||||
};
|
||||
|
||||
// Load the tree if its not already present
|
||||
if(jQuery.jstree._reference(tree)) updateFn();
|
||||
if(jQuery.jstree._reference(tree) || !val) updateFn();
|
||||
else this.loadTree(null, updateFn);
|
||||
},
|
||||
setValue: function(val) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user