mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 22:03:27 -07:00
WebUI: Fix collapsing folders with expanded folders inside
This commit is contained in:
parent
3dead0793b
commit
8ae3007cf4
1 changed files with 12 additions and 2 deletions
|
@ -2658,8 +2658,18 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
|
||||
this._updateNodeCollapseIcon(node, shouldCollapse);
|
||||
|
||||
for (const child of node.children)
|
||||
this._updateNodeVisibility(child, shouldCollapse);
|
||||
this._updateNodeChildVisibility(node, shouldCollapse);
|
||||
},
|
||||
|
||||
_updateNodeChildVisibility: function(root, shouldHide) {
|
||||
const stack = [...root.children];
|
||||
while (stack.length > 0) {
|
||||
const node = stack.pop();
|
||||
|
||||
this._updateNodeVisibility(node, (shouldHide ? shouldHide : this.isCollapsed(node.root.rowId)));
|
||||
|
||||
stack.push(...node.children);
|
||||
}
|
||||
},
|
||||
|
||||
clear: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue