Skip to content

Commit 63414d3

Browse files
authored
Merge branch 'master' into dmdimitrov/exporter-services-migration
2 parents 562ce8c + 59b9af5 commit 63414d3

File tree

10 files changed

+670
-118
lines changed

10 files changed

+670
-118
lines changed

projects/igniteui-angular/src/lib/data-operations/sorting-strategy.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,20 @@ export class IgxSorting implements IGridSortingStrategy {
150150
fullResult.data.push(groupItem);
151151
}
152152
if (expanded) {
153-
metadata.push(...fullResult.metadata.slice(fullResult.metadata.length - group.length));
154-
result.push(...fullResult.data.slice(fullResult.data.length - group.length));
153+
// Replaced object destructing as in a single big group scenario
154+
// it hits the max number of arguments for a function the underlying JS engine
155+
// supports.
156+
let j = fullResult.metadata.length - group.length;
157+
158+
for (; j < fullResult.metadata.length; j++) {
159+
metadata.push(fullResult.metadata[j]);
160+
}
161+
162+
j = fullResult.data.length - group.length;
163+
164+
for (; j < fullResult.data.length; j++) {
165+
result.push(fullResult.data[j]);
166+
}
155167
}
156168
}
157169
i += group.length;

projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { AbsoluteScrollStrategy } from '../../../services/overlay/scroll';
2929
import { DisplayDensity } from '../../../core/displayDensity';
3030
import { IgxDatePickerComponent } from '../../../date-picker/date-picker.component';
3131
import { IgxTimePickerComponent } from '../../../time-picker/time-picker.component';
32-
import { PlatformUtil } from '../../../core/utils';
32+
import { isEqual, PlatformUtil } from '../../../core/utils';
3333
import { Subject } from 'rxjs';
3434
import { takeUntil } from 'rxjs/operators';
3535

@@ -70,14 +70,23 @@ export class IgxGridFilteringRowComponent implements AfterViewInit, OnDestroy {
7070
public set value(val) {
7171
if (!val && val !== 0) {
7272
this.expression.searchVal = null;
73-
this.showHideArrowButtons();
73+
const index = this.expressionsList.findIndex(item => item.expression === this.expression);
74+
if (index === 0 && this.expressionsList.length === 1) {
75+
this.clearFiltering();
76+
return;
77+
}
7478
} else {
79+
const oldValue = this.expression.searchVal;
80+
if (isEqual(oldValue, val)) {
81+
return;
82+
}
83+
7584
this.expression.searchVal = DataUtil.parseValue(this.column.dataType, val);
7685
if (this.expressionsList.find(item => item.expression === this.expression) === undefined) {
7786
this.addExpression(true);
7887
}
88+
this.filter();
7989
}
80-
this.filter();
8190
}
8291

8392
public get displayDensity() {

0 commit comments

Comments
 (0)