akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 876 forks source link

Class configuration not working #549

Open Xaconi opened 7 years ago

Xaconi commented 7 years ago

I'm setting up a smart-table, but I can't add a class to an entire column. I've got this configuration:

settings = { columns: { SERIENUMERO: { title: this.translate.instant("invoices.NUMERO"), type: 'text', class: 'align-center' }, TOTAL: { title: this.translate.instant("invoices.TOTAL"), type: 'text', valuePrepareFunction: (cell,row) => row.TOTAL + " € ", }, FECHA: { title: this.translate.instant("invoices.FECHA"), type: 'date' }, EMPRESA: { title: this.translate.instant("invoices.EMPRESA"), type: 'string' }, PDF: { title: this.translate.instant("invoices.PDF"), type: 'custom', valuePrepareFunction: (cell,row) => row, renderComponent: InvoicePDFButtonComponent } }, actions: { add: false, edit: false, delete: false }, };

But in the "SERIENUMERO" column I can't add the "align-center" class. It's courious, because if I check the HTML result code, I found the "align-center" class on the of that column. But I want it in the entire column, not only on the header. Is this possible? Or this is a bug?

c3098051 commented 7 years ago

+1..

malditonekro commented 6 years ago

Same problem here

SolarisYan commented 6 years ago

Same problem here

iamisti commented 6 years ago

+1

Kappyh commented 5 years ago

Yeap, same problem in Angular 8.2.5 and version 1.5.0 from smart-table.

Alokeen commented 4 years ago

Same in 2020, v1.5.0, Angular 8.0.

column.class styles only the TH elements.

pishangujeniya commented 2 years ago

➕👍 Same problem here, class is only applied to element i.e. Header of the Ng2SmartTable