primefaces / primeng

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

P-TreeTable: Column width in percentage #12342

Open PranKe01 opened 1 year ago

PranKe01 commented 1 year ago

Describe the bug

When using colspan in the p-treetable, the width of each column is set in pixel isntead of percentage (for example when resizing a column). That way, whenever the width of the table changes, the layout breaks, because the sum of the width of the columns may be greater than the new table width.

Environment

Windows.

Reproducer

https://www.primefaces.org/primeng-v14/treetable/colresize

Angular version

14.0.4

PrimeNG version

14.2.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

14

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to https://www.primefaces.org/primeng-v14/treetable/colresize
  2. Make the columns of the "fit mode table" wider (you will notice a scrollbar on the bottom, which is already a bad thing)
  3. Make the browser window smaller (you will notice an even bigger scrollbar)

Expected behavior

In fit mode, there should be no horizontal scrollbar, when changing column sizes.

PranKe01 commented 1 year ago

@mertsincan Any update here? :)

PranKe01 commented 1 year ago

@mertsincan In PrimeNG v16.0.0, the column resize does not seem to work (at least in the demo): https://primeng.org/treetable#columnresize

When you try to resize the column, nothing happens and the slider keeps active :|

PranKe01 commented 1 year ago

@cetincakiroglu Column resizing does not work. As this is a quiet popular feature, I am wondering why nobody is fixing it?

VolodymyrKornetskyi commented 2 months ago

I also have issues with columns sizing.