我正在使用angular 2和ngx-datatable,我想知道是否可以使用html功能或CSS技巧在桌面顶部显示分页而不是底部?
html代码:
<ngx-datatable class="material"
[rows]="rows"
[columnMode]="'force'"
[headerHeight]="40"
[footerHeight]="40"
[rowHeight]="30"
[externalPaging]="true"
[limit]="50"
[selectionType]="'checkbox'">
<ngx-datatable-column
[width]="30"
[sortable]="false"
[canAutoResize]="false"
[draggable]="false"
[resizeable]="false"
[headerCheckboxable]="true"
[checkboxable]="true">
</ngx-datatable-column>
<ngx-datatable-column name="Name">
<ng-template let-value="value" ngx-datatable-cell-template>
<div class="redNumber">{{value}}</div>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Title"></ngx-datatable-column>
<ngx-datatable-column name="company"></ngx-datatable-column>
<ngx-datatable-column name="Status" [cellClass]="getStatusClass"></ngx-datatable-column>
<ngx-datatable-column name="Last connexion"></ngx-datatable-column>
答案 0 :(得分:0)
CSS解决方案如下:
.ngx-datatable {
overflow: visible !important;
}
.datatable-pager {
position: absolute;
top: -56px;
right: 0;
}
这不是我想要的解决方案,但无法找到另一种方式,希望有所帮助。