1.6.0
Breaking change.
before:
<ng2-table></ng2-table>
after:
<ngx-table></ngx-table>
Custom sort This option is removed in 2.0
sortBy(key, order): void {
this.sort = {
key: key,
order: order,
};
}
<div>
<button class="dropdown" (click)="sortBy('created', 'asc')">Created asc</button>
<button class="dropdown" (click)="sortBy('created', 'desc')">Created desc</button>
<button class="dropdown" (click)="sortBy('id', 'asc')">ID</button>
</div>
<ngx-table
[configuration]="configuration"
[filters]="filters"
[sort]="sort">
</ngx-table>
Custom css styles:
Add custom styles to table:
- ngx-table__header
- ngx-table__header-cell
- ngx-table__header-cell-additional-actions
- ngx-table__sortHeader
- ngx-table__body-empty
- ngx-table__footer
- ngx-table__global-search
- ngx-table__header-search
- ngx-table__table-menu
- ngx-icon-menu
- ngx-icon ngx-icon-arrow-up
- ngx-icon ngx-icon-arrow-down
- ngx-menu-item
- ngx-pagination
- ngx-page-item