From 4c5c4440027b9c52be7373c841e332f4ffe63f6c Mon Sep 17 00:00:00 2001 From: CentreMetre Date: Sun, 14 Jun 2026 21:11:09 +0100 Subject: [PATCH] Add HTMLElement support --- abstract-table.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/abstract-table.ts b/abstract-table.ts index 8619f37..751a431 100644 --- a/abstract-table.ts +++ b/abstract-table.ts @@ -149,6 +149,13 @@ export abstract class Table { const cell: HTMLTableCellElement = document.createElement("td"); 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 = ""; switch (column.type) {