Add HTMLElement support

This commit is contained in:
CentreMetre
2026-06-14 21:11:09 +01:00
parent fbaf215078
commit 4c5c444002

View File

@@ -149,6 +149,13 @@ export abstract class Table<TRow extends object> {
const cell: HTMLTableCellElement = document.createElement("td"); const cell: HTMLTableCellElement = document.createElement("td");
const value = data[column.key] const value = data[column.key]
// Element values are inserted as children, not stringified.
if (value instanceof HTMLElement) {
cell.appendChild(value);
row.append(cell);
continue; // skip the textContent path that would wipe it
}
let cellValue = ""; let cellValue = "";
switch (column.type) { switch (column.type) {