primefaces / primeng

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

Table footer ignores table layout #16672

Open m4nd4l opened 3 weeks ago

m4nd4l commented 3 weeks ago

Describe the bug

See your example https://v18.primeng.org/table#column-group,

The footer contains one row with three cells: image

But the result is put all into one cell: image

Environment

Not relevant since it's visible your own documentation. But I can reproduce it on a Windows 10 system with below setup (Angular, PrimeNG, Node) as well as an Stackblitz example that uses Angular 17.

Reproducer

https://stackblitz.com/edit/stackblitz-starters-9zrjzs?file=src%2Fmain.ts

Angular version

18.2.9

PrimeNG version

18.0.0-beta.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.18.0

Browser(s)

Chrome 126.0.6424.1

Steps to reproduce the behavior

See https://v18.primeng.org/table#column-group or https://stackblitz.com/edit/stackblitz-starters-9zrjzs?file=src%2Fmain.ts

Expected behavior

The given table layout in the footer section should be applied.

jamesrusso commented 5 days ago

See #16743 for some additional information.

This seems to be the relevant section of code from @cetincakiroglu

https://github.com/primefaces/primeng/blame/d83e4ad23895d254f0012104fe3ebbf15de5458b/packages/primeng/src/table/table.ts#L3387

Seems like the div is needed if you want just a table summary, but I would think that if its going in a tfoot it should have tfoot -> tr -> td columns to follow the table structure.