mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 06:13:36 -07:00
WebUI: Do not try to set rowHeight to 0
This commit is contained in:
parent
277024d0b8
commit
818a527ea1
1 changed files with 16 additions and 11 deletions
|
@ -950,17 +950,22 @@ window.qBittorrent.DynamicTable ??= (() => {
|
||||||
this.updateRow(row, true);
|
this.updateRow(row, true);
|
||||||
|
|
||||||
// refresh row height based on first row
|
// refresh row height based on first row
|
||||||
setTimeout(() => {
|
const tr = this.tableBody.firstChild;
|
||||||
if (this.tableBody.firstChild === null)
|
if (tr !== null) {
|
||||||
return;
|
const updateRowHeight = () => {
|
||||||
const tr = this.tableBody.firstChild;
|
if (tr.offsetHeight === 0)
|
||||||
if (this.rowHeight !== tr.offsetHeight) {
|
return;
|
||||||
this.rowHeight = tr.offsetHeight;
|
if (this.rowHeight !== tr.offsetHeight) {
|
||||||
// rerender on row height change
|
this.rowHeight = tr.offsetHeight;
|
||||||
this.rerender();
|
// rerender on row height change
|
||||||
}
|
this.rerender();
|
||||||
|
}
|
||||||
});
|
};
|
||||||
|
if (tr.offsetHeight === 0)
|
||||||
|
setTimeout(updateRowHeight);
|
||||||
|
else
|
||||||
|
updateRowHeight();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
createRowElement: function(row, top = -1) {
|
createRowElement: function(row, top = -1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue