Default options for ngx-datatables

1.9k views Asked by At

How to override/set default parameters of ngx-datatables in Angular 2?

1

There are 1 answers

1
Dennis On

Can you define what you mean by default parameters? An example of ngx datatables that I have is the following:

<ngx-datatable #table
    class="material"
    [rows]="rows"
    [columns]="cols"
    [columnMode]="'force'"
    [headerHeight]="50"
    [footerHeight]="50"
    [rowHeight]="'auto'"
    [externalPaging]="true"
    [externalSorting]="true"
    [count]="filter.totalElements"
    [offset]="filter.pageNumber"
    [limit]="filter.size"
    [reorderable]="false"
    [messages]="{emptyMessage: 'Geen data om weer te geven', totalMessage: 'totaal'}"
    (page)='setPage($event)'
    (sort)="onSort($event)"
    [selected]="selected"
    [selectionType]="'checkbox'"
    (select)='onSelect($event)'
    [rowIdentity]="getId">
</ngx-datatable>

But I don't know if this is what you're looking for...?