How to hide column in PrimeNG turbo table?

By February 12, 2018 No Comments
282 views
3

Hi I am trying to convert my PrimeNG data-table to turbo table. Actually I have used  `[hidden]=”!cols.visibility”` in PrimeNG my data-table. Now what I should used to achieve the same in turbo table.

Previous datatable Column Code :

<p-column *ngFor="let col of cols"
[hidden]="!col.visibility"
[field]="col.field"
[header]="col.header">
</p-column>

● Documentation URL: https://www.primefaces.org/primeng/#/datatable

New Turbo table Column Code :

<ng-template pTemplate="header" let-cols>
<tr>
<th style="width: 2.25em"></th>
<th *ngFor="let col of cols">
{{col.header}}
</th>
</tr>
</ng-template>

● Documentation URL :  https://www.primefaces.org/primeng/#/table

What should I use ? I have checked documentation as well but didn’t find solution.

Answered question
Add a Comment
Write your answer.

About Vijay Dhanvai

A passionate blogger by heart and mind, I have been working in this field for 7 years now. A WordPress Professional, web developer and designer who intends to guide his readers about Web Design, WordPress, Blogging, Web Development, and more.