* Gets all keyes used in data by traversing through the data.
()
| 67 | * Gets all keyes used in data by traversing through the data. |
| 68 | */ |
| 69 | getDataKeys(): (keyof T)[] { |
| 70 | const keys = new Set<keyof T>(); |
| 71 | |
| 72 | // Collect all the keys. |
| 73 | for (const data of this.props.data) { |
| 74 | for (const key in data) { |
| 75 | keys.add(key); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | return Array.from(keys); |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Calculates the width of each column by finding |