Add HTMLElement support
This commit is contained in:
@@ -149,6 +149,13 @@ export abstract class Table<TRow extends object> {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user