ashl1 / datatables-rowsgroup

The Datatables feature plugin that groups rows (merge cells vertically) in according to specified columns.
Other
95 stars 94 forks source link

Multiples tables, same page, different settings #12

Open petermlm opened 7 years ago

petermlm commented 7 years ago

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.

ashl1 commented 7 years ago

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)

meno14 commented 5 years ago

any update? @ashl1

Neryes1 commented 4 years ago

I have the same problem, any update?