I am trying to assign unique widths to each column in my columns using [style] based on the example given. I attempted to use
[style]="{'width.px':'column.length + 10'}"
, but unfortunately, 'column.length' isn't functioning properly in the template. Below is an example of my template:
<p-column *ngFor="let column of columns"
[field]="column"
[header]="label[column] ? label[column] : column"
[style]="{'width.px':'column.length + 10'}"></p-column>
Any advice or assistance with this would be greatly appreciated. Thanks.