Problem/Motivation

According to https://datatables.net/, the DataTables library is currently 2.3.8. In the module used 1.10. To keep using it, we need to update it.

Steps to reproduce

See the README.txt file or look at the official page on https://www.drupal.org/project/datatables.

Proposed resolution

Update version to 2.x.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork datatables-3589761

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

just-me created an issue. See original summary.

just-me’s picture

Assigned: Unassigned » just-me

just-me’s picture

I've updated the datatables.js logic with no jQuery. Please review it.
Updated the libraries to connect to the new DataTables 2.3.8 version.

The new version of DataTables is here.
My installer-paths from the composer.json are:
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/libraries/datatables": ["npm-asset/datatables.net"],
...
}

just-me’s picture

Assigned: just-me » Unassigned
quadrexdev’s picture

Status: Active » Needs review
just-me’s picture

Title: Updating the Datatables library to 2.x » Updating the Datatables library to 2.x (from jQuery to Vanila JS)
just-me’s picture

Updated according to the PR suggestions.

  • just-me committed cc709f81 on 2.x
    fix: #3589761 Installed library of the Datatables and set up libraries....
just-me’s picture

Status: Needs review » Fixed

Merged to 2.x, thanks to everyone.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • just-me committed 104c3fcc on 2.x
    fix: #3589761 Installed library of the Datatables and set up libraries....

  • just-me committed 98678f46 on 2.x
    fix: #3589761 Installed library of the Datatables and set up libraries....
dqd’s picture

Title: Updating the Datatables library to 2.x (from jQuery to Vanila JS) » Updating the Datatables library to 2.x (from jQuery to Vanilla JS)
Priority: Major » Normal
Status: Fixed » Needs work

Thanks for all the work on this, but: Please elaborate on this and this a little bit more since this should actually belong to a new version of the Drupal project and please do NOT add hard coded styles into module markup. Also, as I stated on the too early created 3.x release issue already: we need to discuss and clarify the DataTables dev statements made here and here to not confuse users and dependencies.

Plus: Typo corrected in issue title.

dqd’s picture

Title: Updating the Datatables library to 2.x (from jQuery to Vanilla JS) » Updating the Datatables library to 2.x

One more thanks to all the work in here and on other issues. Very much appreciated. But as I stated already on the too early created 3.x release issue and here above in earlier comments and in some other issues already: we need to discuss and clarify the DataTables dev statements made regarding jQuery dependency and thus the Drupal project will remain depending on jQuery reflecting the DataTables development and release dependency on jQuery.

As I stated already on #2999400: [META] Keep track of DataTables library versions regarding the library: as of April 2025 the last comments of Allen (developer DataTables) show that jQuery dependency will probably stay:
https://datatables.net/forums/discussion/comment/237689/#Comment_237689
https://datatables.net/forums/discussion/comment/239470/#Comment_239470

dqd’s picture