Scrollable table may misalign when there is less data then scrollHeight #5013
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
See my plunk: https://plnkr.co/edit/Y45WRBI6EAEaAfNml7VG?p=preview
Current behavior
Thanks for your previous suggestion to use pTemplate="colgroup" for setting column widths with p-table.
However, with p-table 5.2.0-rc.2, if you set the columns widths as percentages with pTemplate="colgroup", set [scrollable]="true", but set scrollHeight large enough that a scroll bar is not displayed, then the header columns and body columns do not line up because the body is wider than the header.
Expected behavior
If the scroll bar is not displayed, the space on the right of the header should be hidden too, making the columns line up again.
Minimal reproduction of the problem with instructions
See my plunk: https://plnkr.co/edit/Y45WRBI6EAEaAfNml7VG?p=preview
What is the motivation / use case for changing the behavior?
A table where the header lines up with the body columns
Please tell us about your environment:
Angular CLI: 1.6.3
Node: 8.9.4
OS: win32 x64
Angular: 5.2.1
Angular version: 5.2.1
PrimeNG version: 5.2.0-rc.2
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome: 63
Language: [all | TypeScript X.X | ES6/7 | ES5]
Typescript 2.4.2
Node (for AoT issues):
node --version
=Node: 8.9.4
The text was updated successfully, but these errors were encountered: