复选框在ngx-datatable中不可见

时间:2018-08-13 13:38:06

标签: node.js angular ngx-datatable

代码:这是一个示例html代码。操作正常,但复选框不可见。

 <ngx-datatable
              style="width: 90%"
              class="material"
              [rows]="rows"
              [columnMode]="'force'"
              [headerHeight]="50"
              [footerHeight]="50"
              [rowHeight]="'auto'"
              [limit]="5"
              [selected]="selected"
              [selectionType]="'checkbox'"
              [selectAllRowsOnPage]="false"
              [displayCheck]="displayCheck"
              (activate)="onActivate($event)"
              (select)='onSelect($event)'>
              <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"></ngx-datatable-column>
              <ngx-datatable-column name="Gender"></ngx-datatable-column>
              <ngx-datatable-column name="Company"></ngx-datatable-column>
            </ngx-datatable>

import语句添加到src / Style.css

@import '~@swimlane/ngx-datatable/release/index.css';
@import '~@swimlane/ngx-datatable/release/themes/material.css';
@import '~@swimlane/ngx-datatable/release/assets/icons.css';

我使用的是ngx-datatable版本:^ 11.3.2,因此存在要删除的节点代码

input[type="checkbox"], input[type="radio"] { display: none; }

1 个答案:

答案 0 :(得分:0)

您的ngx数据表中具有displayCheck函数,如果该函数处于活动状态,则肯定会有隐藏的复选框。

[displayCheck] =“ displayCheck”