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 the connect() method of the data source. It does not get called on initial navigation to the route, but it does when you navigate the second time
One 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.
The data source connect method should be called after navigating to page via router
The data source connect method is not called
http://plnkr.co/edit/RRVoUV9SBAxozY6VhvpA?p=preview
latest master, and beta8
same for me
Same here.
When calling changeDetector.detectChanges after setting the DataSource to manually trigger ChangeDetection the Table will show up.
Same here.
The workaround with changeDetector.detectChanges also works for me, but is not satisfying.
Same here
Same for me !
How is this Issue closed?
I mean it does have a workaround that somehow works, but the issue itself is not fixed.
At least the workaround should be mentioned on the documentation.
---- Edit
Ooops its merged, forget it.
Lost so much time figuring this out... =(
I also tried to use snapshot builds but it was not working either.
The detectChanges works but let's hope beta 9 is available with a fix soon :)
I can confirm this hack is not necessary anymore with beta10.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Same here.
When calling changeDetector.detectChanges after setting the DataSource to manually trigger ChangeDetection the Table will show up.
http://plnkr.co/edit/Soc0n4ak80VKdZ27htVU?p=preview