mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 14:23:35 -07:00
WebUI: Maintain row highlight after rearranging table columns
This commit is contained in:
parent
6e1b5ec18b
commit
d48d621cc8
1 changed files with 2 additions and 4 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue