
jquery-datatables-row-grouping - issue #60
Expand/collapse icon display gets messed up when you have two tables on the same page that have the same grouping values
Our application displays two tables on the same page that both use the rowGrouping plugin. Both tables end up having the same grouping values in them like 'Critical', 'Important', etc. When we expand/collapse a group in one of the tables, the expand/collapse icon for the other table changes as well (though the table neither expands nor collapses).
What is the expected output? What do you see instead? I expect that I should be able to expand/collapse one table without affecting the other table.
What version of the product are you using? On what operating system? We're currently using the 1.2.7 version of the plugin.
Please provide any additional information below. It looks like it's marking things as expanded/collapsed based on the data-group attribute. Since both tables have the exact same value there 'critical', both tables get updated. I could not find a way to control the data-group attribute that gets set to make it unique among the two different tables.
Comment #1
Posted on Sep 27, 2013 by Helpful BearA fix would be to search only inside the original table element. Change the lines 280-281 and 308-309 in the functions fnExpandGroup() and fnCollapseGroup() to:
$("td[data-group^='" + sGroup + "']", oTable).removeClass("collapsed-group"); $("td[data-group^='" + sGroup + "']", oTable).addClass("expanded-group");
$("td[data-group^='" + sGroup + "']", oTable).removeClass("expanded-group"); $("td[data-group^='" + sGroup + "']", oTable).addClass("collapsed-group");
Status: New
Labels:
Type-Defect
Priority-Medium