ng-zorro-antd icon indicating copy to clipboard operation
ng-zorro-antd copied to clipboard

nz-table column width doesn't decrease on resize

Open strigefleur opened this issue 3 years ago • 4 comments

Reproduction link

https://angular-hquq8a-r8smqv.stackblitz.io

Steps to reproduce

  1. Add nz-table with 1 fixed width (nzWidth="100px") column and another fluid column (without nzWidth)
  2. Increase window size
  3. Decrease windows size

What is expected?

Second column (without nzWidth) width is decreased back to fit available space, no horizontal scroll appears.

What is actually happening?

Second column (without nzWidth) width stays increased, horizontal scroll appears.

Environment Info
ng-zorro-antd 13.0.1
Browser Firefox

Related to https://github.com/NG-ZORRO/ng-zorro-antd/issues/5227

@vthinkxie commented that "without nzWidth, ng-zorro-antd will auto calc the nzWidth every time". But actually it calcs only on windows size increase, not when you decrease it back.

strigefleur avatar Jan 22 '22 17:01 strigefleur

Same issue: https://ng-zorro-antd-ivy-fqgt7f.stackblitz.io When nzTableLayout="fixed" & [nzScroll]="{ x: '100%' }". After updating view (bootstrap column in example) – width of table is not updating.

thekhegay avatar Oct 28 '22 08:10 thekhegay

Any WIP for this issue?

juancarlosgzs avatar Sep 09 '23 20:09 juancarlosgzs

Still a problem in the latest version.

lppedd avatar May 07 '24 11:05 lppedd

The problem in version 17.4.0 is reproducible. If you delete th in thead - tr, then the size changes, perhaps this will somehow help the developers in the solution.

IvanSemenov82 avatar Aug 15 '24 19:08 IvanSemenov82