mirror of https://github.com/node-red/node-red.git
Minor change to treeList select/expand behaviour
parent
fcc7ea2ad2
commit
8bb80daded
|
|
@ -632,12 +632,12 @@
|
|||
});
|
||||
// $('<span class="red-ui-treeList-icon"><i class="fa fa-folder-o" /></span>').appendTo(label);
|
||||
label.on("click.red-ui-treeList-expand", function(e) {
|
||||
if (that.options.expandOnLabel !== false || item.expandOnLabel === true) {
|
||||
if (container.hasClass("expanded")) {
|
||||
if (item.hasOwnProperty('selected') || label.hasClass("selected")) {
|
||||
item.treeList.collapse();
|
||||
}
|
||||
} else {
|
||||
if (container.hasClass("expanded")) {
|
||||
if (label.hasClass("selected")) {
|
||||
item.treeList.collapse();
|
||||
}
|
||||
} else {
|
||||
if (item.expandOnLabel === true || label.hasClass("selected")) {
|
||||
item.treeList.expand();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue