ng2-smart-table icon indicating copy to clipboard operation
ng2-smart-table copied to clipboard

Class configuration not working

Open Xaconi opened this issue 7 years ago • 7 comments

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?

Xaconi avatar Sep 22 '17 10:09 Xaconi

+1..

c3098051 avatar Sep 25 '17 03:09 c3098051

Same problem here

malditonekro avatar Oct 19 '17 17:10 malditonekro

Same problem here

SolarisYan avatar Nov 18 '17 08:11 SolarisYan

+1

iamisti avatar May 27 '18 12:05 iamisti

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

Kappyh avatar Sep 23 '19 15:09 Kappyh

Same in 2020, v1.5.0, Angular 8.0.

column.class styles only the TH elements.

Alokeen avatar Jan 20 '20 11:01 Alokeen

➕👍 Same problem here, class is only applied to

element i.e. Header of the Ng2SmartTable

pishangujeniya avatar Nov 19 '21 10:11 pishangujeniya