[ADF-5153] Transclusion exposed from the DataTable to the DocumentList (#5743)

* [ADF-5153] Transclusion exposed from the DataTable to the DocumentList

* [ADF-5153] Add flags to control transclusion

* [ADF-5153] Remove Ngif breaking the transclusion
This commit is contained in:
Baptiste Mahé
2020-06-02 16:31:56 +02:00
committed by GitHub
parent 6b06fd6364
commit 439e3c7a7c
4 changed files with 16 additions and 0 deletions

View File

@@ -34,6 +34,7 @@
adf-drop-zone dropTarget="header" [dropColumn]="col">
<span *ngIf="col.title" class="adf-datatable-cell-value">{{ col.title | translate}}</span>
<span *ngIf="col.title && col.sortable" class="adf-sr-only" aria-live="polite">{{ getSortLiveAnnouncement(col) | translate: { string: col.title | translate } }}</span>
<ng-template *ngIf="allowFiltering" [ngTemplateOutlet]="filterTemplateRef" [ngTemplateOutletContext]="{$implicit: col}"></ng-template>
</div>
<!-- Actions (right) -->
<div *ngIf="actions && actionsPosition === 'right'" class="adf-actions-column adf-datatable-cell-header adf-datatable__actions-cell">

View File

@@ -169,6 +169,15 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
@Input()
resolverFn: (row: DataRow, col: DataColumn) => any = null;
/**
* Flag that indicate if the datatable allow the use facet widget search for filtering.
*/
@Input()
allowFiltering: boolean = false;
@ContentChild(TemplateRef)
filterTemplateRef: TemplateRef<any>;
noContentTemplate: TemplateRef<any>;
noPermissionTemplate: TemplateRef<any>;
loadingTemplate: TemplateRef<any>;