generated from coulomb/repo-seed
Implement dashboard UI improvements
This commit is contained in:
@@ -401,12 +401,18 @@ export function buildEntityTable(rows, columns, onRowClick) {
|
||||
for (const col of columns) {
|
||||
const td = document.createElement("td");
|
||||
const raw = col.key ? row[col.key] : null;
|
||||
const text = col.render ? col.render(row) : (raw ?? "—");
|
||||
const textStr = String(text ?? "—");
|
||||
td.textContent = textStr;
|
||||
const rendered = col.render ? col.render(row) : (raw ?? "—");
|
||||
let textStr = "";
|
||||
if (rendered instanceof Node) {
|
||||
td.append(rendered);
|
||||
textStr = td.textContent ?? "";
|
||||
} else {
|
||||
textStr = String(rendered ?? "—");
|
||||
td.textContent = textStr;
|
||||
}
|
||||
if (col.cls) td.className = col.cls;
|
||||
// Native tooltip so full value shows on hover (skip placeholder "—")
|
||||
if (textStr && textStr !== "—") td.title = textStr;
|
||||
if (!(rendered instanceof Node) && textStr && textStr !== "—") td.title = textStr;
|
||||
tr.append(td);
|
||||
}
|
||||
tbody.append(tr);
|
||||
|
||||
Reference in New Issue
Block a user