Skip to content

Commit 2321427

Browse files
authored
Merge branch 'master' into vmihalkov/paginator-overlay-settings
2 parents b299eed + 9460ddb commit 2321427

File tree

7 files changed

+21
-9
lines changed

7 files changed

+21
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ All notable changes for each version of this project will be documented in this
55
## 10.0.0
66

77
### General
8+
- `igxGrid`
9+
- **Behavioral Change** - Group rows now display the group column's header name instead of field when one is available.
810
- `igx-select`, `igx-combo`, `igx-drop-down`
9-
- **Behavioral Change** - The select, combo, and dropdown items now have display block and text-overflow ellipsis enabled by default.
11+
- **Behavioral Change** - The select, combo, and dropdown items now have display block and text-overflow ellipsis enabled by default.
1012
- `IgxTransaction` - The `onStateUpdate` now emits with information of its origin. The emitted value is of type `StateUpdateEvent`, which has two properties:
1113
- `origin` - it can vary within the values of the `TransactionEventOrigin` interface;
1214
- `actions` - contains information about the transactions, that caused the emission of the event.

projects/igniteui-angular/src/lib/data-operations/groupby-record.interface.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ISortingExpression } from './sorting-expression.interface';
2+
import { IgxColumnComponent } from '../grids/columns/column.component';
23

34
/**
45
* @hidden
@@ -13,4 +14,5 @@ export interface IGroupByRecord {
1314
groupParent: IGroupByRecord;
1415
groups?: IGroupByRecord[];
1516
height: number;
17+
column?: IgxColumnComponent;
1618
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,16 @@ export class IgxSorting implements IGridSortingStrategy {
160160
let result = [];
161161
while (i < data.length) {
162162
const group = this.groupedRecordsByExpression(data, i, expressions[level]);
163+
const column = grid ? grid.getColumnByName(expressions[level].fieldName) : null;
163164
const groupRow: IGroupByRecord = {
164165
expression: expressions[level],
165166
level,
166167
records: cloneArray(group),
167168
value: group[0][expressions[level].fieldName],
168169
groupParent: parent,
169170
groups: [],
170-
height: grid ? grid.renderedRowHeight : null
171+
height: grid ? grid.renderedRowHeight : null,
172+
column: column
171173
};
172174
if (parent) {
173175
parent.groups.push(groupRow);

projects/igniteui-angular/src/lib/grids/grid/grid.groupby.spec.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,8 @@ describe('IgxGrid - GroupBy #grid', () => {
529529
for (const grRow of groupRows) {
530530
const elem = grRow.groupContent.nativeElement;
531531
const grVal = grRow.groupRow.value === null ? '' : grRow.groupRow.value.toString();
532-
const expectedText = 'Total items with value:' + grVal +
532+
const expectedText = 'Grouping by "Is it Released". ' +
533+
'Total items with value:' + grVal +
533534
' are ' + grRow.groupRow.records.length;
534535
expect(elem.innerText.trim(['\n', '\r', ' '])).toEqual(expectedText);
535536
const expander = grRow.nativeElement.querySelector('.igx-grid__grouping-indicator');
@@ -2694,9 +2695,12 @@ export class GroupableGridComponent extends DataParent {
26942695
<igx-column [field]="'ReleaseDate'" [header]="'ReleaseDate'" [width]="200" [groupable]="true" [hasSummary]="false"></igx-column>
26952696
<igx-column [field]="'Downloads'" [header]="'Downloads'" [width]="200" [groupable]="true" [hasSummary]="false"></igx-column>
26962697
<igx-column [field]="'ProductName'" [header]="'ProductName'" [width]="200" [groupable]="true" [hasSummary]="false"></igx-column>
2697-
<igx-column [field]="'Released'" [header]="'Released'" [width]="200" [groupable]="true" [hasSummary]="false"></igx-column>
2698+
<igx-column [field]="'Released'" [header]="'Is it Released'" [width]="200" [groupable]="true" [hasSummary]="false"></igx-column>
26982699
<ng-template igxGroupByRow let-groupRow>
2699-
<span>Total items with value:{{ groupRow.value }} are {{ groupRow.records.length }}</span>
2700+
<span>
2701+
Grouping by "{{groupRow.column.header}}".
2702+
Total items with value:{{ groupRow.value }} are {{ groupRow.records.length }}
2703+
</span>
27002704
</ng-template>
27012705
<ng-template igxRowExpandedIndicator let-groupRow>
27022706
<span>EXPANDED</span>

projects/igniteui-angular/src/lib/grids/grid/groupby-row.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
<div class="igx-group-label">
2323
<igx-icon fontSet="material" class="igx-group-label__icon">group_work</igx-icon>
2424
<span class="igx-group-label__column-name">
25-
{{ groupRow.expression ? groupRow.expression.fieldName : '' }}:
25+
{{ groupRow.column && groupRow.column.header ?
26+
groupRow.column.header :
27+
(groupRow.expression ? groupRow.expression.fieldName : '') }}:
2628
</span>
2729

2830
<ng-container *ngIf="dataType === 'boolean' || dataType === 'string'; else default" >

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export class IgxGridGroupByRowComponent {
205205
* @hidden
206206
*/
207207
get dataType(): any {
208-
const column = this.grid.getColumnByName(this.groupRow.expression.fieldName);
208+
const column = this.groupRow.column;
209209
return (column && column.dataType) || DataType.String;
210210
}
211211
}

projects/igniteui-angular/src/lib/slider/slider.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,6 @@ export class IgxSliderComponent implements
625625
} else {
626626
this._value = value;
627627
}
628-
629-
this._onChangeCallback(value);
630628
}
631629

632630
/**
@@ -1420,10 +1418,12 @@ export class IgxSliderComponent implements
14201418
public setValue(value: number | IRangeSliderValue) {
14211419
if (!this.isRange) {
14221420
this.upperValue = value as number - (value as number % this.step);
1421+
this._onChangeCallback(this.upperValue);
14231422
} else {
14241423
value = this.validateInitialValue(value as IRangeSliderValue);
14251424
this.upperValue = (value as IRangeSliderValue).upper;
14261425
this.lowerValue = (value as IRangeSliderValue).lower;
1426+
this._onChangeCallback({lower: this.lowerValue, upper: this.upperValue});
14271427
}
14281428
}
14291429

0 commit comments

Comments
 (0)