Minor change to treeList select/expand behaviour

pull/5556/head
Nick O'Leary 2026-03-10 16:22:44 +00:00
parent fcc7ea2ad2
commit 8bb80daded
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 6 additions and 6 deletions

View File

@ -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();
}
}