diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 5ab1e7cf0..e8cfa0755 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -2359,6 +2359,9 @@ window.qBittorrent.DynamicTable ??= (() => { for (const [key, _] of this.collapseState) this.expandNode(key); + + if (this.useVirtualList) + this.rerender(); } collapseAllNodes() { @@ -2370,6 +2373,9 @@ window.qBittorrent.DynamicTable ??= (() => { if (state.depth >= 1) this.collapseNode(key); } + + if (this.useVirtualList) + this.rerender(); } #updateNodeVisibility(node, shouldHide) { @@ -2741,8 +2747,10 @@ window.qBittorrent.DynamicTable ??= (() => { generateRowsSignature() { const rowsData = []; - for (const { rowId } of this.getRowValues()) - rowsData.push({ ...this.getNode(rowId).serialize(), collapsed: this.isCollapsed(rowId) }); + for (const { rowId } of this.getRowValues()) { + const node = this.getNode(rowId); + rowsData.push({ ...node.serialize(), collapsed: this.isCollapsed(node.rowId) }); + } return JSON.stringify(rowsData); } @@ -2771,7 +2779,7 @@ window.qBittorrent.DynamicTable ??= (() => { // sort, then filter this.#sortNodesByColumn(root, this.columns[this.sortedColumn]); const rows = (() => { - if (this.filterTerms.length === 0) { + if (!this.useVirtualList && (this.filterTerms.length === 0)) { const nodeArray = this.fileTree.toArray(); const filteredRows = nodeArray.map(node => this.getRow(node)); return filteredRows; diff --git a/src/webui/www/private/scripts/prop-files.js b/src/webui/www/private/scripts/prop-files.js index f40076100..5f07eeffc 100644 --- a/src/webui/www/private/scripts/prop-files.js +++ b/src/webui/www/private/scripts/prop-files.js @@ -74,6 +74,7 @@ window.qBittorrent.PropFiles ??= (() => { const new_hash = torrentsTable.getCurrentTorrentID(); if (new_hash === "") { torrentFilesTable.clear(); + current_hash = ""; clearTimeout(loadTorrentFilesDataTimer); return; } @@ -176,6 +177,7 @@ window.qBittorrent.PropFiles ??= (() => { const clear = () => { torrentFilesTable.clear(); + current_hash = ""; }; return exports();