mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
WebUI: Maintain row highlight after rearranging table columns
This PR fixes a bug where row highlight effect would be lost after reordering columns. PR #22339.
This commit is contained in:
@@ -293,6 +293,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
||||
this.updateTableHeaders();
|
||||
this.tableBody.replaceChildren();
|
||||
this.updateTable(true);
|
||||
this.reselectRows(this.selectedRowsIds());
|
||||
}
|
||||
if (this.currentHeaderAction === "drag") {
|
||||
resetElementBorderStyle(el);
|
||||
@@ -751,10 +752,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
||||
reselectRows: function(rowIds) {
|
||||
this.deselectAll();
|
||||
this.selectedRows = rowIds.slice();
|
||||
for (const tr of this.getTrs()) {
|
||||
if (rowIds.includes(tr.rowId))
|
||||
tr.classList.add("selected");
|
||||
}
|
||||
this.setRowClass();
|
||||
},
|
||||
|
||||
setRowClass: function() {
|
||||
|
||||
Reference in New Issue
Block a user