ContextMenu
<p-contextMenu #cm [model]="items" appendTo="body"></p-contextMenu>
<p-table
[value]="productsContextMenu"
[(contextMenuSelection)]="selectedContextMenu"
[contextMenu]="cm"
dataKey="code"
responsiveLayout="scroll"
>
<ng-template pTemplate="header">
<tr>
<th>Code</th>
<th>Name</th>
<th>Category</th>
<th>Price</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-product>
<tr [pContextMenuRow]="product">
<td>{ { product.code } }</td>
<td>{ { product.name } }</td>
<td>{ { product.category } }</td>
<td>{ { product.price | currency: 'USD' } }</td>
</tr>
</ng-template>
</p-table>