-
Notifications
You must be signed in to change notification settings - Fork 354
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
Fix blank table after switching routes #30
Fix blank table after switching routes #30
Conversation
…witching Fix blank table after switching routes
thanks @alexspeller. Merged |
@alexspeller @ppong We are still seeing this problem using the latest builds, especially in tables with only a few rows of data. We can force the table to "re-render" after route changes if we manually add this code to Ember.Table.TablesContainer: didInsertElement: function () {
} Are you seeing this behavior still too? |
@alexspeller @ppong This issue should be reopened! If you render a table, transition to another route, then transition back into the table, the "content" property does not change, and the table rows do not render again. (You see a blank gray table.) In controllers.coffee, line 218, the method bodyContent observes the "content" property. This is not enough. We added a simple "refire" property which is incremented when the TableContainer is inserted (didInsertElement). This forces the table rows to re-render. This is not the ideal solution, but it's a step in the right direction. |
I'm also running into the same issue. My hack was inside of setupController Ember.run.next(function() { |
@ppong this should probably be reopened. It may be due to view reuse when only the model of a route changes (but not the route itself), although this is speculation. @bengillies I wouldn't be surprised if you hit this at some point |
@alexspeller yep, came across this yesterday. Can confirm it still exists as an issue. |
+1 |
This fixes a bug causing a blank gray table after switching routes. This only manifests when the table is scrolled from the top, and then you switch to a different route that removes the table and then switch back again and the table is re-inserted. In this case the controller caches the scroll top and causes the whole body of the table to be blank until the table is scrolled.