mkhairi / jquery-datatables

Jquery datatables ruby gems for assets pipeline
https://datatables.net/
Other
75 stars 18 forks source link

Long loading time #9

Closed jarrettyew closed 6 years ago

jarrettyew commented 6 years ago

I have about 1000 records to load in a go. When I was loading it, it was taking around 4-5 seconds to load each time. Is there any way to put it into ajax on loading? The setting in datatable seems to prompt errors when I add them.

mkhairi commented 6 years ago

You need to enable server-side pagination on your app. Take a look at gem ajax-datatables-rails simple solution.

jarrettyew commented 6 years ago

The server side rendering works well, but there's 2 issues:

screen shot 2018-04-22 at 12 57 11 am

Since the solution given could not be integrated with your current gem, is there any suggestion you could provide in the meantime?

mkhairi commented 6 years ago

@yewness, you still can use this gem along with gem 'ajax-datables-rails'. just replace the old one.

jarrettyew commented 6 years ago

@mkhairi Yeap, I've got it working. Just need to follow through the steps from ajax datatable then the data will appear in the table.

gem 'jquery-datatables' gem 'ajax-datatables-rails'

Perhaps, it would be great if a documentation can be added for this one. Thanks a lot!