primeng icon indicating copy to clipboard operation
primeng copied to clipboard

TurboTable can't use resize and scroll together

Open aunkang opened this issue 8 years ago • 6 comments

I try to add [resizableColumns]="true" and pResizableColumn with [scrollable]="true" scrollHeight="200px" but when i resize column only th of table that resize. column-bug

aunkang avatar Jan 29 '18 11:01 aunkang

You need to use a colgroup, please check out the documentation.

cagataycivici avatar Jan 29 '18 13:01 cagataycivici

I've seen this error and can be reproduced in the following link https://angular-9lvke9.stackblitz.io

winarg avatar Jan 29 '18 13:01 winarg

A colgroup is required to support resize + scroll.

cagataycivici avatar Jan 29 '18 13:01 cagataycivici

thanks

aunkang avatar Jan 30 '18 03:01 aunkang

You mean Add Colspan? Can you please tell me exactly what needs to be done to have column resize and scroll work. I have a demo here: https://stackblitz.com/edit/github-tatj4e-zimyuu

shaikhspear16 avatar May 25 '18 11:05 shaikhspear16

Example based on stackblitz <h3 class="first">Vertical</h3> <p-table [columns]="cols" [value]="cars1" [scrollable]="true" scrollHeight="200px" [resizableColumns]="true"> <ng-template pTemplate="colgroup" let-tableColumns> <colgroup> <col *ngFor="let col of tableColumns" > </colgroup> </ng-template> <ng-template pTemplate="header" let-columns> <tr> <th *ngFor="let col of columns" pResizableColumn> {{col.header}} </th> </tr> </ng-template> <ng-template pTemplate="body" let-rowData let-columns="columns"> <tr> <td *ngFor="let col of columns" class="ui-resizable-column"> {{rowData[col.field]}} </td> </tr> </ng-template> </p-table>

winarg avatar May 25 '18 11:05 winarg