Skip to content

Commit c4d5753

Browse files
authored
Merge branch 'master' into pbozhinov/fix-7416
2 parents 61363d8 + 9460ddb commit c4d5753

26 files changed

+164
-65
lines changed

CHANGELOG.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
All notable changes for each version of this project will be documented in this file.
44

5+
## 10.0.0
6+
7+
### General
8+
- `igxGrid`
9+
- **Behavioral Change** - Group rows now display the group column's header name instead of field when one is available.
10+
- `igx-select`, `igx-combo`, `igx-drop-down`
11+
- **Behavioral Change** - The select, combo, and dropdown items now have display block and text-overflow ellipsis enabled by default.
12+
- `IgxTransaction` - The `onStateUpdate` now emits with information of its origin. The emitted value is of type `StateUpdateEvent`, which has two properties:
13+
- `origin` - it can vary within the values of the `TransactionEventOrigin` interface;
14+
- `actions` - contains information about the transactions, that caused the emission of the event.
15+
16+
### New Features
17+
- `IgxGrid`
18+
- `showGroupArea` input is added, which can be used to enable/disable the group area row.
19+
520
## 9.1.1
621

722
### General
@@ -129,11 +144,11 @@ All notable changes for each version of this project will be documented in this
129144
```typescript
130145
public pinningConfiguration: IPinningConfig = { columns: ColumnPinningPosition.End };
131146
```
132-
- Added new properties for paging:
133-
- `totalRecords` set to alter the pages count based on total remote records. Keep in mind that If you are using paging and all the data is passed to the grid, the value of totalRecords property will be set by default to the length of the provided data source. If totalRecords is set, it will take precedent over the default length based on the data source.
134-
- `pagingMode` - accepts `GridPagingMode` enumeration. If the paging mode is set to remote the grid will not paginate the passed data source, if the paging mode is set to local (which is the default value) the grid will paginate the data source based on the page, perPage and totalRecords values.
147+
- Added new properties for paging:
148+
- `totalRecords` set to alter the pages count based on total remote records. Keep in mind that If you are using paging and all the data is passed to the grid, the value of totalRecords property will be set by default to the length of the provided data source. If totalRecords is set, it will take precedent over the default length based on the data source.
149+
- `pagingMode` - accepts `GridPagingMode` enumeration. If the paging mode is set to remote the grid will not paginate the passed data source, if the paging mode is set to local (which is the default value) the grid will paginate the data source based on the page, perPage and totalRecords values.
135150
- Added functionality for column selection.
136-
- `columnSelection` property has been added. It accepts GridSelection mode enumeration. Grid selection mode could be none, single or multiple.
151+
- `columnSelection` property has been added. It accepts GridSelection mode enumeration. Grid selection mode could be none, single or multiple.
137152
- `selected` property has been added to the IgxColumnComponent; Allows you to set whether the column is selected.
138153
- `selectable` property has been added to the IgxColumnComponent; Allows you to set whether the column is selectable.
139154
- `onColumnSelectionChange` event is added for the `IgxGrid`. It is emitted when the column selection is changed.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<ng-container *ngIf="!isHeader">
22
<igx-checkbox [checked]="selected" disableRipple="true" [disableTransitions]="disableTransitions" [tabindex]="-1" (click)="disableCheck($event)" class="igx-combo__checkbox"></igx-checkbox>
33
</ng-container>
4-
<ng-content></ng-content>
4+
<span class="igx-drop-down__inner"><ng-content></ng-content></span>

projects/igniteui-angular/src/lib/core/styles/components/drop-down/_drop-down-component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
@extend %igx-drop-down__item !optional;
2626
}
2727

28+
@include e(inner) {
29+
@extend %igx-drop-down__inner !optional;
30+
}
31+
2832
@include e(item, $m: cosy) {
2933
@extend %igx-drop-down__item--cosy !optional;
3034
}

projects/igniteui-angular/src/lib/core/styles/components/drop-down/_drop-down-theme.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@
271271
}
272272
}
273273

274+
%igx-drop-down__inner {
275+
display: block;
276+
@include ellipsis();
277+
}
278+
274279
%igx-drop-down__item--cosy {
275280
height: map-get($item-height, 'cosy');
276281
padding: map-get($item-padding, 'cosy');

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);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<ng-content></ng-content>
1+
<span class="igx-drop-down__inner"><ng-content></ng-content></span>

projects/igniteui-angular/src/lib/drop-down/drop-down.component.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const CSS_CLASS_DROP_DOWN_BASE = 'igx-drop-down';
2121
const CSS_CLASS_LIST = 'igx-drop-down__list';
2222
const CSS_CLASS_SCROLL = 'igx-drop-down__list-scroll';
2323
const CSS_CLASS_ITEM = 'igx-drop-down__item';
24+
const CSS_CLASS_INNER_SPAN = 'igx-drop-down__inner';
2425
const CSS_CLASS_GROUP_ITEM = 'igx-drop-down__group';
2526
const CSS_CLASS_ITEM_COSY = 'igx-drop-down__item--cosy';
2627
const CSS_CLASS_ITEM_COMPACT = 'igx-drop-down__item--compact';
@@ -977,7 +978,7 @@ describe('IgxDropDown ', () => {
977978
dropdown.toggle();
978979
fixture.detectChanges();
979980
expect(dropdown.collapsed).toBeFalsy();
980-
const dropdownItems = document.querySelectorAll(`.${CSS_CLASS_ITEM}`);
981+
const dropdownItems = document.querySelectorAll(`.${CSS_CLASS_INNER_SPAN}`);
981982
expect(dropdownItems.length).toEqual(9);
982983
expect(dropdown.items.length).toEqual(9);
983984
for (let i = 0; i < dropdownItems.length; i++) {

projects/igniteui-angular/src/lib/grids/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ Below is the list of all inputs that the developers may set to configure the gri
212212
| `isLoading` | bool | Sets if the grid is waiting for data - default value false. |
213213
| `rowDraggable` | bool | Sets if the grid rows can be dragged |
214214
| `columnSelection` | GridSelectionMode | Sets if the grid columns can be selected |
215+
| `showGroupArea` | boolean | Set/get whether the group are row is shown |
215216

216217
### Outputs
217218

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ import {
4646
OverlaySettings,
4747
PositionSettings,
4848
ConnectedPositioningStrategy,
49-
ContainerPositionStrategy
49+
ContainerPositionStrategy,
50+
StateUpdateEvent,
51+
TransactionEventOrigin
5052
} from '../services/public_api';
5153
import { GridBaseAPIService } from './api.service';
5254
import { IgxGridCellComponent } from './cell.component';
@@ -2846,7 +2848,20 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
28462848
this.summaryService.clearSummaryCache(args);
28472849
});
28482850

2849-
this.transactions.onStateUpdate.pipe(destructor).subscribe(() => {
2851+
this.transactions.onStateUpdate.pipe(destructor).subscribe((event: StateUpdateEvent) => {
2852+
let actions = [];
2853+
if (event.origin === TransactionEventOrigin.REDO) {
2854+
actions = event.actions ? event.actions.filter(x => x.transaction.type === TransactionType.DELETE) : [];
2855+
} else if (event.origin === TransactionEventOrigin.UNDO) {
2856+
actions = event.actions ? event.actions.filter(x => x.transaction.type === TransactionType.ADD) : [];
2857+
}
2858+
if (actions.length > 0) {
2859+
for (const action of actions) {
2860+
if (this.selectionService.isRowSelected(action.transaction.id)) {
2861+
this.selectionService.deselectRow(action.transaction.id);
2862+
}
2863+
}
2864+
}
28502865
this.selectionService.clearHeaderCBState();
28512866
this.summaryService.clearSummaryCache();
28522867
this._pipeTrigger++;

0 commit comments

Comments
 (0)