As I already mentioned on the Drupal 8 Contrib Porting Tracker page, we developed a datatable port with lots of customizations and functions.

Started with the full ajax implementation, own pager and many other things. This port is ready to use but still in development. If you like we can open another branch where we can put this code.

This code is sponsored by steel.online - sell and buy steel online. As a co developer of the tool I can give lots of credits to the guys of wunderkraut and specially to frega which was heavily involved into the development of this modul.

Just give it a try and return some response

CommentFileSizeAuthor
#15 afterajxexpose_filter.PNG28.93 KBdhiraj bhagat
#15 beforeajaxexposefilter.PNG29.29 KBdhiraj bhagat
#8 views-ajax-datatable-2821987-3.patch130.46 KBAnonymous (not verified)
#7 views-ajax-datatable-2821987-2.patch231.96 KBAnonymous (not verified)
#6 views-ajax-datatable-2821987-1.patch471.36 KBAnonymous (not verified)
#4 views-ajax-datatable-2821987.patch225.03 KBAnonymous (not verified)
datatables.tar_.gz566.67 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Almare created an issue. See original summary.

Growiel’s picture

I've been doing some tests with this branch.

Overall it's working okay, except for the exposed filters. They are ignored by datatables completely.

I did see an exposed_form plugin for views in the module but for me it's not working at all.

Is that on purpose ? Is work on this branch going to continue ?

Anonymous’s picture

Not for the last months. This should be alternative idea to the current branch some months ago, because of the missing ajax support. I think this branch needs some work.

Anonymous’s picture

Update: After I saw the work of @BlacKICEUA I reviewed and extend his additions. I add some fixes and new features.
Most of the work is now done to use the complete datatable with views and ajax support.

  1. Merge BlackICEUA code
  2. Fix: Composer http to https
  3. Add combined searchfield filter which works now with exposed form (simple fulltext search over mutiple fields)
  4. Make sorting work
  5. Refactor a little bit

I hope this is useful for someone and many thanks back to BlacKICEUA.

Anonymous’s picture

Title: Drupal 8 - another branch » Drupal 8 ajax views implementation
Category: Support request » Task
Priority: Normal » Major
Status: Active » Needs review
Anonymous’s picture

Remove old style plugin and fix some typos.

Anonymous’s picture

Rename Plugins to DataTables and some minor changes

Anonymous’s picture

FileSize
130.46 KB
dqd’s picture

Awesome work, Almare! Can you please link to @BlackICEUA's code your patch is based on, so that we know if it is an issue here or from a repo somewhere else? I will review the patch ASAP. 1+

Anonymous’s picture

Sorry for the question, but what do you mean with link to @BlackICEUA?

dqd’s picture

#4: Update: After I saw the work of @BlacKICEUA I reviewed and extend his additions.

(Sorry, maybe a misunderstanding on my side?)

dqd’s picture

Priority: Major » Normal
Status: Needs review » Postponed (maintainer needs more info)

Hm, still not sure what to do now. We would like to go on with DT 8.x but I would love to get more report on this code here and if/how it still works and if this patch can be simply rerolled/merged against latest dev, etc. Otherwise for me or any other contributor or maintainer it would be a huge amount of work to go thru the code of others which is not based on the existing branch.

leisurman’s picture

@diqidog
I'm in the same situation. My client wants to use datatables in Drupal 8 but we want to sort based on the date format mm/dd/yyyy. Datatables needs a plugin to do this. We need to add the ultimate date plugin here https://datatables.net/blog/2014-12-18. Problem is that it only works on Datatables library version 1.10.18 or higher. The Drupal Datatables module is using version 1.9.3. We decided to add the js files to the datatables module. moment.min.js and datetime-moment.js. So are library looks like this.

datatables_core:
  version: 1.9
  js:
    js/moment.min.js: {}
    /libraries/datatables/media/js/jquery.dataTables.js: {}
    js/datetime-moment.js: {}

We added the moment date function $.fn.dataTable.moment( 'MM/DD/YYYY' ); directly to Datatables library file datatables.js. like this:

(function ($) {
  Drupal.behaviors.datatables = {
    attach: function (context, settings) {
      +$.fn.dataTable.moment( 'MM/DD/YYYY' );
      $.each(settings.datatables, function (selector) {

Then we found we need to use the Datatables version 1.10.19. I tried to add the patch from here and the one on this page. But Composer fails to apply them. I am wondering if the author can provide it as a new custom module. I wont need to use Composer to install it. Or if we could get the instructions on how to change the module so that it can use library version 1.10.19. For now I am going to try to apply this patch manually.

dhiraj bhagat’s picture

Assigned: » Unassigned

Any one is working further for this. It seems to me everything is working on 1st load. This is not working when exposed filter apply.

dhiraj bhagat’s picture

apaderno’s picture

Anybody’s picture

Version: 8.x-1.x-dev » 2.x-dev

What's the status in 2.x here? Still relevant?

Anybody’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Closing this as duplicate of #3014240: Implementing views ajax support