mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: updating the value of a tree dropdown field, its title is not updated accordingly if using TreeTitle as the drropdown item title
This commit is contained in:
parent
4e18cc581b
commit
cd13c0e178
@ -122,8 +122,10 @@
|
||||
var updateFn = function() {
|
||||
var val = self.getValue();
|
||||
if(val) {
|
||||
|
||||
var node = tree.find('*[data-id="' + val + '"]'),
|
||||
title = (node) ? tree.jstree('get_text', node[0]) : null;
|
||||
title = node.children('a').find("span.jstree_pageicon")?node.children('a').find("span.item").html():null;
|
||||
if(!title) title=(node) ? tree.jstree('get_text', node[0]) : null;
|
||||
|
||||
if(title) self.setTitle(title);
|
||||
if(node) tree.jstree('select_node', node);
|
||||
|
Loading…
x
Reference in New Issue
Block a user