Skip to content
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

Datatable column misalignment issue on page change #3465

Closed
amitgaikwad02bright opened this issue Jul 20, 2017 · 2 comments
Closed

Datatable column misalignment issue on page change #3465

amitgaikwad02bright opened this issue Jul 20, 2017 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@amitgaikwad02bright
Copy link

amitgaikwad02bright commented Jul 20, 2017

Current behavior

Issue is with Datatable with scrollable true & scroll height specified & paging enabled.
When page is changed header columns are getting misaligned.

Expected behavior

columns should not get misaligned

Minimal reproduction of the problem with instructions

link to plnk http://plnkr.co/edit/1FIX0hM0oEkMNJIpm27u?p=preview

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

tested on windows

  • Angular version: 2.0.X

angular 4.2.0

  • PrimeNG version: 2.0.X

primeng 4.1.1

  • 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,IE

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

@amitgaikwad02bright
Copy link
Author

ScrollableView components alignScrollBar method which set marginRight on scrollableHeader is getting called before grid rendering properly with paging change.
I put debug point in alignScrollBar method, found that, after page index changes, datatable has new page records as well old page records, at that moment hasVerticalOverflow returns true & marginRight get set.

@cagataycivici cagataycivici self-assigned this Aug 23, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Aug 23, 2017
@cagataycivici cagataycivici added this to the 4.1.4 milestone Aug 23, 2017
@cagataycivici
Copy link
Member

This is actually a bug of Angular 4.x, it was working with a previous version, at after view checked old dom elements also exist as you said so all calculations are messed up. Only known solution is a small timeout. We'll create an issue to Angular team about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants