* Returns a (data) row representing the headings.
()
| 115 | * Returns a (data) row representing the headings. |
| 116 | */ |
| 117 | getHeadings(): Partial<T> { |
| 118 | const { columns } = this.getConfig(); |
| 119 | |
| 120 | const headings: Partial<T> = columns.reduce( |
| 121 | (acc, column) => ({ ...acc, [column]: column }), |
| 122 | {} |
| 123 | ); |
| 124 | |
| 125 | return headings; |
| 126 | } |
| 127 | |
| 128 | /* Rendering utilities */ |
| 129 |