Here is the code snippet I am using to display a table inside a mat-nav-list
:
<mat-nav-list>
<table>
<tr>Node Information</tr>
<tr>
<td>Name</td>
<td *ngIf="activeNode">{{activeNode.Name}}</td>
</tr>
<tr>
<td>AutomationId</td>
<td *ngIf="activeNode">{{activeNode.AutomationId}}</td>
</tr>
<tr>
<td>ClassName</td>
<td *ngIf="activeNode">{{activeNode.ClassName}}</td>
</tr>
<tr>
<td>ControlType</td>
<td *ngIf="activeNode">{{activeNode.ControlType}}</td>
</tr>
</table>
<mat-accordion>
<app-tree-display [nodeElements]="nodeElements" (clickedNodeCallback)="clickedNode($event[0])"></app-tree-display>
</mat-accordion>
</mat-nav-list>
This is how it currently looks:
https://i.sstatic.net/MjGeS.png
I want the table to occupy the full width of the mat-nav-list, but when I set the width to 100%, it expands beyond the parent element like this:
https://i.sstatic.net/s2H1q.png
Is there a way to restrict the width to match that of the parent element?