I want to reduce the width of a few columns I'm using in primeng grid. However as per my understanding, we can only change the width of columns we create using "p-column" or the "th" tag.
PFA code snippets below: HTML:
<th *ngFor="let col of columns" [pSortableColumn]="col.field"colspan="col.colspan" style="text-align:
center;">
{{col.header}}
<p-sortIcon [field]="col.field"></p-sortIcon>
</th>
And the TS:
this.cols = [
{ field: 'first', header:'FIRST'},
{ field: 'second', header: 'SECOND'},
{ field: 'third', header: 'THIRD'},
{ field: 'fourth', header: 'FOURTH'},
{ field: 'fifth', header: 'FIFTH'},
{ field: 'sixth', header: 'SIXTH'}
];
How can we change the width for a dynamic column in sortable primeng table?