|
|
@@ -12,14 +12,17 @@
|
|
|
(change)="onToggleAllClick()"
|
|
|
/>
|
|
|
</th>
|
|
|
- <th *ngFor="let column of columns?.toArray()" class="align-middle" [class.expand]="column.expand">
|
|
|
+ <th *ngFor="let column of visibleColumns; last as isLast" class="align-middle" [class.expand]="column.expand">
|
|
|
<div class="cell-content" [ngClass]="column.align">
|
|
|
{{ column.heading }}
|
|
|
</div>
|
|
|
+ <div *ngIf="isLast" class="column-picker">
|
|
|
+ <vdr-data-table-colum-picker [columns]="columns?.toArray()"></vdr-data-table-colum-picker>
|
|
|
+ </div>
|
|
|
</th>
|
|
|
</tr>
|
|
|
<tr *ngIf="searchTermControl || filters?.length">
|
|
|
- <th [attr.colspan]="columns.length + (selectionManager ? 1 : 0)" class="filter-row">
|
|
|
+ <th [attr.colspan]="visibleColumns.length + (selectionManager ? 1 : 0)" class="filter-row">
|
|
|
<input [formControl]="searchTermControl" [placeholder]="searchTermPlaceholder" />
|
|
|
<div class="filters">
|
|
|
<vdr-data-table-filters
|
|
|
@@ -59,7 +62,7 @@
|
|
|
(click)="onRowClick(item, $event)"
|
|
|
/>
|
|
|
</td>
|
|
|
- <td *ngFor="let column of columns?.toArray()">
|
|
|
+ <td *ngFor="let column of visibleColumns">
|
|
|
<div class="cell-content" [ngClass]="column.align">
|
|
|
<ng-container
|
|
|
*ngTemplateOutlet="column.template; context: { item: item, index: i }"
|
|
|
@@ -69,12 +72,12 @@
|
|
|
</tr>
|
|
|
<ng-container>
|
|
|
<tr *ngIf="!items?.length">
|
|
|
- <td [attr.colspan]="columns.length + (selectionManager ? 1 : 0)">
|
|
|
+ <td [attr.colspan]="visibleColumns.length + (selectionManager ? 1 : 0)">
|
|
|
<vdr-empty-placeholder [emptyStateLabel]="emptyStateLabel"></vdr-empty-placeholder>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td *ngFor="let column of columns?.toArray()" class="left align-middle"></td>
|
|
|
+ <td *ngFor="let column of visibleColumns" class="left align-middle"></td>
|
|
|
</tr>
|
|
|
</ng-container>
|
|
|
</tbody>
|