-
Notifications
You must be signed in to change notification settings - Fork 161
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
igx-grid not resizing properly when closing igx-nav-drawer #3639
Comments
The problem is in the grid width calculation. I'll take it. |
Linking a forum post that it looks like has the same issue: https://www.infragistics.com/community/forums/f/ignite-ui-for-angular/119473/simplest-way-to-style-grid |
We found a temporary solution. We created an observable on the the navdrawer closing, and had each component with tables subscribe to that observable in the ngOnInit method and reflowing. Service w/ Observable
Component with Navdrawer
Component with Table
|
@joedementri Yes. The current solution is to call manually IgxGridComponent.reflow when the IgxNavigationDrawerComponent opens/closes. The limitation is because the horizontal virtualization relies on pixels and we're recalculating percents to pixels and there is no appropriate event handler that will allow us to do this automatically without compromising the performance. |
Hey @joedementri, another approach that you may consider is to use HostListener for
|
Thank you @zdrawku , that solution is better than the one we had previously as this one doesn't cause a ViewDestroyedError to be thrown when the navbar closes |
Description
When closing a navdrawer, the Igx Grid does not resize, as it stays the same width as if the navdrawer wasn't closed.
Steps to reproduce
Result
When the navdrawer remains is open, the page with the grid loads in
When the navdrawer is closed, the grid doesn't resize, staying the same width as it did before the navdrawer was closed.
Expected result
Expect the Igx Grid to resize to the full width of page after a navdrawer is closed.
Attachments
The text was updated successfully, but these errors were encountered: