-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic scrollbar leads to misalignment between table header and row columns #6991
Comments
Similar issue to what is described in #6560 where the widths effected by the scroll bars are not being continuously calculated. |
there is a little error in table.ts: this.scrollBodyViewChild.nativeElement.style.marginBottom = this.domHandler.calculateScrollbarWidth() + 'px'; this piece of code should be instead this.scrollBodyViewChild.nativeElement.style.paddingBottom = this.domHandler.calculateScrollbarWidth() + 'px'; |
Are you guys planning to fix this? |
This is not an issue. This is about angular change detection. When you pushing item to array then detection not calling. You can use three dots notation instead of push like this;
and there is stackblitz example; |
@yigitfindikli is exactly the same as I said here: #6236 , but you forced a detectChanges (instead apply one spread operator) that breaks the performance if you have a huge number of elements inside of every cell (editions for example) |
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.
https://stackblitz.com/edit/github-cc2ast-tzyb9x
Current behavior
Table header entries are not aligned with row columns, when a scrollbar fades in dynamically.
Expected behavior
The entries in the header should also be moved to the right, when it is neccessary to display a scrollbar for the table.
Minimal reproduction of the problem with instructions
1.) Open link above
2.) Click button "click me"
What is the motivation / use case for changing the behavior?
The misalignment leads to user confusion and it looks ugly.
Please tell us about your environment:
MS Windows 10 64 Bit, Node version 8.11.2, NPM version 5.6.0
Angular version: 7.1.3
PrimeNG version: 7.0.0
Could also be reproduced in PrimeNG version 6.1.4 with Angular 6.1.4
Browser: [Chrome 71.0.3578.80 | Firefox 64.0]
Language: [TypeScript 3.6]
Node (for AoT issues):
node --version
= 8.11.2The text was updated successfully, but these errors were encountered: