I am trying to create a dynamic table using primeng 18 where some columns are scrollable whilst some are frozen. Problem is only scrollable columns are getting printed with the following code. In the earlier version of primeng 18 the code used to work fine but not now. I tried printing the cols via test method and it has only scrollable columns.
<p-table #pv [columns]="scrollableHeaders" [frozenColumns]="frozenHeaders" scrollHeight="200px" [scrollable]="true"
[frozenWidth]="frozenWidth" [value]="sortData" [paginator]="true" [rows]="10" [globalFilterFields]="['RegionId']"
sortField="MainLocation" sortMode="single" (onSort)="onSort(sortData, 'MainLocation')"
currentPageReportTemplate="Showing {first} to {last} of {totalRecords} entries"
[rowsPerPageOptions]="[10, 25, 50, 100, 200, 500]">
<ng-template pTemplate="colgroup" let-columns>
<colgroup>
<ng-container *ngFor="let col of columns">
<col *ngIf="col.inputControls != 'HiddenField'" [style.width]="test(col)" />
</ng-container>
</colgroup>
</ng-template>
<ng-template pTemplate="header" let-columns>
<tr>
<ng-container *ngFor="let col of columns">
<th *ngIf="col.inputControls != 'HiddenField'">
{{ col.header }}
</th>
</ng-container>
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowData let-columns="columns" let-rowIndex="rowIndex">
<tr>
<ng-container *ngFor="let col of columns">
<td *ngIf="col.inputControls != 'HiddenField'">
<ng-container *ngIf="col.dataType === 'decimal' || col.dataType === 'real'; else checkInt">
{{rowData[col.field] | number:'1.2-2'}}
</ng-container>
<ng-template #checkInt>
<ng-container *ngIf="col.dataType === 'int'; else defaultFormat">
{{rowData[col.field] | number:'1.0-2'}}
</ng-container>
</ng-template>
<!-- Default formatting for non-decimal types -->
<ng-template #defaultFormat>
{{rowData[col.field]}}
</ng-template>
</td>
</ng-container>
</tr>
</ng-template>
<ng-template pTemplate="footer" let-columns>
<tr>
<td *ngFor="let col of columns; let i = index">
<span *ngIf="!col.frozenCols" title="Sum of all values in column {{ col.field }}">
<span *ngIf="i === 0" class="footer-sigma-icon">Σ =
</span>
{{calculateVisiblePrimengTotal(col.field, pv)| number : "1.0-2"}}
</span>
</td>
</tr>
</ng-template>
</p-table>