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

Table in the index page is empty when first rendering. #209

Open
levi-l-damian opened this issue May 24, 2016 · 2 comments
Open

Table in the index page is empty when first rendering. #209

levi-l-damian opened this issue May 24, 2016 · 2 comments

Comments

@levi-l-damian
Copy link

The table gets populated only after a page refresh is executed.
Everything else works. I am following the Rails Cast #340.

Not sure if this is a bug, or I am missing something here.
My entire code is here: https://github.com/levi-l-damian/test-dt-mg

If am navigating away form the index page when I am coming back the page is again empty.
If I am executing the browser page request, I am getting the table content correctly rendered in the page.

screen shot 2016-05-24 at 6 09 52 am

screen shot 2016-05-24 at 6 10 09 am

@Shwetakale
Copy link

@levi-l-damian Are you using turbolinks. I was facing same issue.When I was hitting a link event was not getting bind and the simple solution was to bind datatable on page load and ready like below.

$(document).on "page:load ready", ->
  datatable_bindings() //This functions initializes my datatable

Hope this helps.

@levi-l-damian
Copy link
Author

It helps, thanks,
Levi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants