-
Notifications
You must be signed in to change notification settings - Fork 6.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
bug(data-table): data source connect not called when using router #5593
Comments
same for me |
Same here. When calling changeDetector.detectChanges after setting the DataSource to manually trigger ChangeDetection the Table will show up. |
Same here. |
…got reloaded. Issue here: angular/components#5593
angular/components#5593 There's a race condition that breaks md-table on route changes. Add a setTimeout so we trigger a second change detection after onInit. Also run format
Same here |
angular/components#5593 There's a race condition that breaks md-table on route changes. Add a setTimeout so we trigger a second change detection after onInit. Also run format
Same for me ! |
How is this Issue closed? |
Lost so much time figuring this out... =( I also tried to use snapshot builds but it was not working either. The |
I can confirm this hack is not necessary anymore with beta10. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
I have copied the exact demo from 'material-examples' into a plunker and have loaded the
TableBasicExample
component via a router. When navigating to the router (via button in toolbar on plunkr), the table does not display correctly. When clicking that button again, it works. In my own application I have tested by including logging in theconnect()
method of the data source. It does not get called on initial navigation to the route, but it does when you navigate the second timeOne resolution I have used is to perform the dataSource initialization in a setTimeout(1), which solves the issue, but I do not believe that this should be the solution.
What is the expected behavior?
The data source connect method should be called after navigating to page via router
What is the current behavior?
The data source connect method is not called
What are the steps to reproduce?
http://plnkr.co/edit/RRVoUV9SBAxozY6VhvpA?p=preview
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
latest master, and beta8
The text was updated successfully, but these errors were encountered: