I'm using primeng in Angular 2. I have p-dataTable. I would like the table to allow multiple column sorting, but also be able to set the preliminary default sort order.
When I try to do this I get the following error:
Cannot read property '0' of undefined
It works fine for a sortMode="single", but I need multiple.
My datatable is defined as:
Code: Select all
<p-dataTable
id="searchResults"
#resultsGrid
[value]="transArray"
expandableRows="true"
data-payxautoid="transactions.grid"
selectionMode="single"
(onRowSelect)="handleRowSelect($event)"
(onRowUnselect)="handleRowUnselect($event)"
[(selection)]="selectedTransaction"
[globalFilter]="gb"
sortMode="multiple"
sortField="effectiveDate"
sortOrder="1"
[rows]="10"
[paginator]="true"
[pageLinks]="10"
[rowsPerPageOptions]="[10,20,30]"
resizableColumns="true"
columnResizeMode="expand"
[paginatorPosition]="top"
styleClass="ui-datatable-hor-scroll"
[rowStyleClass]="lookupRowStyleClass"
[totalRecords]="totalRecords"
>
Thanks.