File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
projects/igniteui-angular/src/lib/grids Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -127,8 +127,8 @@ export class IgxSorting implements IGridSortingStrategy {
127127 fullResult . data . push ( groupItem ) ;
128128 }
129129 if ( expanded ) {
130- metadata . push ( ... fullResult . metadata . slice ( fullResult . metadata . length - group . length ) ) ;
131- result . push ( ... fullResult . data . slice ( fullResult . data . length - group . length ) ) ;
130+ metadata = metadata . concat ( fullResult . metadata . slice ( fullResult . metadata . length - group . length ) ) ;
131+ result = result . concat ( fullResult . data . slice ( fullResult . data . length - group . length ) ) ;
132132 }
133133 }
134134 i += group . length ;
Original file line number Diff line number Diff line change @@ -3822,6 +3822,32 @@ describe('IgxGrid - GroupBy #grid', () => {
38223822 }
38233823 } ) ;
38243824
3825+ it ( 'should be able to build groups with 100 000+ records' , ( ) => {
3826+ const fix = TestBed . createComponent ( GroupableGridComponent ) ;
3827+ const grid = fix . componentInstance . instance ;
3828+
3829+ const data = [ ] ;
3830+ for ( let i = 0 ; i < 1000000 ; i ++ ) {
3831+ data . push ( {
3832+ Downloads : i ,
3833+ ID : 1 ,
3834+ ProductName : 'Test'
3835+ } ) ;
3836+ }
3837+
3838+ fix . componentInstance . data = data ;
3839+ fix . detectChanges ( ) ;
3840+
3841+ grid . groupBy ( {
3842+ fieldName : 'ProductName' ,
3843+ dir : SortingDirection . Asc
3844+ } ) ;
3845+ fix . detectChanges ( ) ;
3846+
3847+ let groupRows = grid . groupsRowList . toArray ( ) ;
3848+ checkGroups ( groupRows , [ 'Test' ] ) ;
3849+ } ) ;
3850+
38253851 describe ( 'GroupBy with state directive' , ( ) => {
38263852 let fix : ComponentFixture < GridGroupByStateComponent > ;
38273853 let state : IgxGridStateDirective ;
You can’t perform that action at this time.
0 commit comments