fix: incorrect locating after sorting

This commit is contained in:
mzz2017 committed 2021-09-15 20:49:08 +08:00
1 parent 2c2368a22c
commit 98db91bd2f
1 file changed
+11 -2
+11 -2
View File
@@ -899,8 +899,17 @@ export default {
// solid
tabIndex = 2;
}
nodes = nodes[tabIndex].querySelectorAll("tbody tr");
const node = nodes[which.id - 1];
nodes = nodes[tabIndex].querySelectorAll("table > tbody > tr");
const node = Array.from(nodes).find(
node =>
parseInt(
node.querySelector('td[data-label="ID"]')?.textContent
) === which.id
);
if (!node) {
console.warn("node not found");
return;
}
node.scrollIntoView({ block: "end", inline: "center" });
let highlightClass = "highlight-row-connected";
if (that.runningState.running !== that.$t("common.isRunning")) {