What is the most efficient method to display a duplicated column with the same data side by side without altering the JSON or using separate matColumnDef keys?
Data:
const ELEMENT_DATA: PeriodicElement[] = [
{position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H'}
];
Attempted duplication:
<!-- Name Column -->
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef> Name </th>
<td mat-cell *matCellDef="let element"> {{element.name}} </td>
</ng-container>
<!-- Duplicate Name Column -->
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef> Name </th>
<td mat-cell *matCellDef="let element"> {{element.name}} </td>
</ng-container>
Error message:
Duplicate column definition name provided: "name".
The error message can only be seen in stackblitz under "open in new tab" at the top right and then check the browser console.
https://stackblitz.com/edit/jska2p?file=src%2Fexample%2Ftable-basic-example.html
Is there a clever workaround to bypass this warning?