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) {