datatables-rowsgroup icon indicating copy to clipboard operation
datatables-rowsgroup copied to clipboard

Multiples tables, same page, different settings

Open petermlm opened this issue 7 years ago • 3 comments

Hello.

If I have the following code:

    var sset = {
        paging: false,
        searching: false,
        rowsGroup: ['some1:name'],
        columns: [{
            name: 'some1',
            title: 't1',
        }, {
            name: 'some2',
            title: 't2',
        }]
    };

    var uset = {
        paging: false,
        searching: false,
        ordering: false,
        rowsGroup: ['some3:name'],
        columns: [{
            name: 'some3',
            title: 't3',
        }, {
            name: 'some4',
            title: 't4',
        }]
    };

    var table_sorted = $('#table_sorted').DataTable(sset);
    var table_unsorted = $('#table_unsorted').DataTable(uset);

    $("#add_stuff").click(function() {
        for(var i=0; i<4; i++) {
            table_sorted.row.add(['value' + count, i]);
            table_unsorted.row.add(['value' + count, i]);
        }
        table_sorted.draw();
        table_unsorted.draw();
        count++;
    });

Only on of the tables will correctly group rows. The other will not.

In different experiments, the first table is the one which gets rows to group, while in other experiments, it is the second.

Is this a bug in the plug-in, some limitation of it, or am I missing something?

Thank you.

petermlm avatar Jun 09 '17 13:06 petermlm

Yes. This is known defect in plugin. I discovered it before the first release but used the plugin only for one table without any modifications. This should be fixed soon (I expect so)

ashl1 avatar Aug 26 '17 13:08 ashl1

any update? @ashl1

meno14 avatar Nov 27 '19 15:11 meno14

I have the same problem, any update?

Neryes1 avatar Oct 27 '20 11:10 Neryes1