Ngx-datatable cellClass

Ngx-datatable cellClass

我正在尝试向我的 ngx-datatable 中的单元格添加 class。

columns.push({ 
    cellTemplate: this.bodyPositionsTmpl, 
    cellClass: 'test', 
    headerTemplate: this.headerPositionsTpl, 
    name: 'Employments', 
    width: this.planningGridColumnWidths.position, 
    frozenLeft: true, 
    frozenRight: false 

});

然而,当我检查我的元素时,我没有看到 class 添加:

<datatable-body-cell ....... class="datatable-body-cell sort-active">

它不应该出现在这里吗?

它确实可以正常工作。我刚刚添加了 class 错误的地方。抱歉!