【问题标题】:ngx datatable pagination with angular2使用angular2的ngx数据表分页
【发布时间】:2018-02-12 17:42:51
【问题描述】:

我正在使用 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>

【问题讨论】:

    标签: css angular datatable pagination


    【解决方案1】:

    CSS 解决方案如下:

    .ngx-datatable {
        overflow: visible !important;
    }
    .datatable-pager {
        position: absolute;
        top: -56px;
        right: 0;
    }
    

    这不是我最初想要的解决方案,但无法找到其他方法,希望有所帮助。

    【讨论】:

      猜你喜欢
      • 2021-02-12
      • 2018-10-29
      • 1970-01-01
      • 2020-04-06
      • 2021-11-01
      • 1970-01-01
      • 2020-05-01
      • 2022-01-14
      • 1970-01-01
      相关资源
      最近更新 更多