NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.85k stars 3.9k forks source link

nz-table column width doesn't decrease on resize #7231

Open strigefleur opened 2 years ago

strigefleur commented 2 years ago

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.

thekhegay commented 1 year ago

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.

juancarlosgzs commented 1 year ago

Any WIP for this issue?

lppedd commented 4 months ago

Still a problem in the latest version.

IvanSemenov82 commented 4 weeks ago

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.