diff --git a/abstract-table.ts b/abstract-table.ts index 50b45cf..f861453 100644 --- a/abstract-table.ts +++ b/abstract-table.ts @@ -85,7 +85,7 @@ export abstract class Table { return keys.map(key => ({ key, // Raw property name from TRow - value: displayNamesAndOrder?.[key] ?? String(key), // The value of the th html element, with a nullish coalescing operator for if its null + headerValue: displayNamesAndOrder?.[key] ?? String(key), // The value of the th html element, with a nullish coalescing operator for if its null type: typeof exampleObject[key], // The type of the column })); } @@ -99,7 +99,7 @@ export abstract class Table { for (const column of this.columns) { const th = document.createElement("th") - th.textContent = column.value; + th.textContent = column.headerValue; // Header value; headerRow.appendChild(th); } @@ -272,6 +272,6 @@ export abstract class Table { export type Column = { key: keyof TRow; // The name of the field. - value: string; // The name of the header cell + headerValue: string; // The name of the header cell type: string; // The type of the field, can be string since typesof are returned as strings. } \ No newline at end of file