primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.58k stars 4.61k forks source link

Table, columns: When resizing columns the width of all other columns changes width as well #12654

Open emilEcru opened 1 year ago

emilEcru commented 1 year ago

Describe the bug

Hi,

Running Angular (15.1) and PrimeNG (15.1)

Issue with PrimeNG tables. When adding [resizableColumns]="true" and columnResizeMode="expand" in the same table, the resizing of columns is breaking. Resizing one column affect all columns (different amounts). In my specific scenario I also want to use table column grouping. This addition seems to make the bug worse.

On my own site i have a large number of columns. When I resize a column the entire table changes a lot. Here below is a StackBlitz to see and test the error. The first table is with table column grouping the second table is without.
The bug, when without table column grouping, is more subtle but if you resize the width a few times you can notis the other columns changing width as well.

Stackblitz for live bug

Environment

Running Angular (15.1) and PrimeNG (15.1) Chrome

Reproducer

https://stackblitz.com/edit/primeng-tablecolresize-demo-q9qwaj?file=src%2Fapp%2Fapp.component.html

Angular version

15.1

PrimeNG version

15.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v16.15.0

Browser(s)

Chrome 109

Steps to reproduce the behavior

No response

Expected behavior

When I resize a column i only want that column resized.

rjGoTwins commented 1 year ago

Is there any progress on this? I have a feeling it is an unintended side-effect of changes described in issue 12047:

https://github.com/primefaces/primeng/issues/12047

I would expect that resizing a column when table-layout is auto could resize other columns, but this should not happen when table-layout is fixed. This is very annoying.

sriteja2602 commented 10 months ago

This is fixed in v16 and above.

Amit221060 commented 2 months ago

What about primeng15? I see its working in LTS but not public versions of 15.