This is the data table in question:
Code: Select all
<p-dataTable [value]="documents" [style]="{'margin-bottom':'20px'}" selectionMode="single"
[rows]="20" [paginator]="true" [pageLinks]="5" [rowsPerPageOptions]="[20,50,100]"
resizableColumns="true"
[loading]="loading" loadingIcon="fa-spinner"
[lazy]="true" [totalRecords]="totalRecords" (onLazyLoad)="loadDocumentsPage($event)"
sortField="sentDate" [sortOrder]="-1">
<p-column field="from.name" header="From" sortable="true"></p-column>
<p-column field="to.name" header="To" sortable="true"></p-column>
<p-column field="documentType" header="Type" sortable="true"></p-column>
<p-column field="documentNumber" header="Number" sortable="true"></p-column>
<p-column field="documentDate" header="Date" sortable="true"></p-column>
<p-column field="status" header="Status" [filter]="true" filterMatchMode="equals">
<ng-template pTemplate="filter">
<p-dropdown [options]="possibleStatuses" [style]="{'width':'100%'}" styleClass="ui-column-filter"></p-dropdown>
</ng-template>
</p-column>
</p-dataTable>