Merge pull request #1301 from babaevmm/patch-1

Update widget-grouping.js
This commit is contained in:
Rob Garrison 2016-11-04 14:58:05 -05:00 committed by GitHub
commit 974116f8b4

View File

@ -234,7 +234,8 @@
if ( $.isFunction( wo.group_formatter ) ) { if ( $.isFunction( wo.group_formatter ) ) {
data.currentGroup = wo.group_formatter( ( data.group || '' ).toString(), data.column, c.table, c, wo, data ) || data.group; data.currentGroup = wo.group_formatter( ( data.group || '' ).toString(), data.column, c.table, c, wo, data ) || data.group;
} }
data.$row.before( tsg.groupHeaderHTML( c, wo, data ) ); //add first() for groping with childRows
data.$row.first().before( tsg.groupHeaderHTML( c, wo, data ) );
if ( wo.group_saveGroups && !data.savedGroup && wo.group_collapsed && wo.group_collapsible ) { if ( wo.group_saveGroups && !data.savedGroup && wo.group_collapsed && wo.group_collapsible ) {
// all groups start collapsed; data.groupIndex is 1 more than the expected index. // all groups start collapsed; data.groupIndex is 1 more than the expected index.
wo.group_collapsedGroups[ wo.group_collapsedGroup ].push( data.currentGroup + data.groupIndex ); wo.group_collapsedGroups[ wo.group_collapsedGroup ].push( data.currentGroup + data.groupIndex );