Closed elricstorm closed 10 years ago
The following fix : https://github.com/rweng/jquery-datatables-rails/pull/77
.. fixed the pagination issue I was having.
However, the page still has to be refreshed after loading in order to show all the datatables components.
The issue with the page having to be refreshed was due to Turbolinks. Turbolinks does not play nice with Rails 4 and DataTables. I'm looking into other avenues, maybe Pjax. I commented out the turbolinks gem and removed the require from my javascript. With Fix #77 and this fix, my datatables is now working fine.
@elricstorm Turbolinks triggers page:load
instead of ready
, binding to that event as well as ready
might fix your issue.
@elricstorm It is working? Can I close the issue?
I do not use Turbolinks any longer so the issue is fixed for me. I do not know if Turbolinks still causes an issue with this gem.
@elricstorm I don't know too, because i do not use Turbolinks. I will close the issue, because i am trying to clean the repository issues. If anyone got the same trouble, they can reopen.
Thanks.
@elricstorm if you are using Foundation, i proposed some changes to @cavalryjim at #83 Updating the datatables plugin files for Foundation 4 . If you help too, i will appreciate.
Like:
Foundation 4: javascripts/foundation/4 and stylesheets/foundation/4
Foundation 5: javascripts/foundation/5 and stylesheets/foundation/5
Thank you very mutch
All of the instructions work fine but when I first load the page that contains the datatable, it just shows a normal table. If I hit F5 after and reload the page, the datatable then loads properly. However, the pagination at the bottom shows text instead of images.
I use a simple method helper to load the datatable in the head. However, I also cannot use SPaginationType foundation and have to use full numbers instead. When using foundation pagination type the entire table disappears.
Application.js contains
Application.css contains
index with the user table shows:
The head tag contains:
I have tested with jquery in the head and out of the head before the body. Both do not work. Foundation is then loaded at the bottom before the body per the new revision in 5.0.x.