Skip to content
This repository was archived by the owner on Jun 6, 2026. It is now read-only.
This repository was archived by the owner on Jun 6, 2026. It is now read-only.

how to use datatables advanced options with js functions #173

Description

@greg606

Is it possible to use more advanced options like this code:

$(document).ready(function() {
    $('#example').DataTable( {
        "columnDefs": [
            {
                // The `data` parameter refers to the data for the cell (defined by the
                // `data` option, which defaults to the column being worked with, in
                // this case `data: 0`.
                "render": function ( data, type, row ) {
                    return data +' ('+ row[3]+')';
                },
                "targets": 0
            },
            { "visible": false,  "targets": [ 3 ] }
        ]
    } );
} );

At the moment it collides with twig.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions