4
votes

Not able to display the ngx datatable default footer properly. Its showing the footer like this ngxdatatable footer

My code

    <ngx-datatable
            #table
            [columnMode]="'force'"
            [headerHeight]="50"
            [rowHeight]="'auto'"
            [footerHeight]="50"
            [count]="true"
            [limit]="4"
            [rows]="data"
        >
    <ngx-datatable-column [width]=10>
      <ng-template let-row="row" ngx-datatable-cell-template>
        <span class="circle" [ngClass]="{'red': row.alertCat == 'HIGH','yellow': row.alertCat == 'MEDIUM', 'green': row.alertCat == 'LOW'}"></span>
      </ng-template>
    </ngx-datatable-column>
    <ngx-datatable-column name="ID" [width]=10>
                    <ng-template let-column="column" ngx-datatable-header-template>
                            <strong class="text-uppercase alertHeading">ID</strong>
                    </ng-template>
      <ng-template let-row="row">
        {{row.id}}
      </ng-template>
    </ngx-datatable-column>
    </ngx-datatable>
2

2 Answers

5
votes

use node_modules/@swimlane/ngx-datatable/release/assets/icons.css in your main .scss file:

"styles": [
    //  ...
    "node_modules/@swimlane/ngx-datatable/release/assets/icons.css"
],
1
votes

If I am not wrong, your footer classes are being overridden by other classes. Inspect them and you will know or provide your icons like from font-awesome. For ex

.datatable-icon-left {
     content: @fa-var-chevron-left;
 }