Skip to content

Commit de44aba

Browse files
authored
Merge branch 'master' into mkirova/hgrid-remote-POC
2 parents 98427bb + d3f4ba2 commit de44aba

21 files changed

+146
-59
lines changed

CHANGELOG.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
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+
- `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.
10+
- `IgxTransaction` - The `onStateUpdate` now emits with information of its origin. The emitted value is of type `StateUpdateEvent`, which has two properties:
11+
- `origin` - it can vary within the values of the `TransactionEventOrigin` interface;
12+
- `actions` - contains information about the transactions, that caused the emission of the event.
13+
14+
### New Features
15+
- `IgxGrid`
16+
- `showGroupArea` input is added, which can be used to enable/disable the group area row.
17+
518
## 9.1.1
619

720
### General
@@ -129,11 +142,11 @@ All notable changes for each version of this project will be documented in this
129142
```typescript
130143
public pinningConfiguration: IPinningConfig = { columns: ColumnPinningPosition.End };
131144
```
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.
145+
- Added new properties for paging:
146+
- `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.
147+
- `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.
135148
- 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.
149+
- `columnSelection` property has been added. It accepts GridSelection mode enumeration. Grid selection mode could be none, single or multiple.
137150
- `selected` property has been added to the IgxColumnComponent; Allows you to set whether the column is selected.
138151
- `selectable` property has been added to the IgxColumnComponent; Allows you to set whether the column is selectable.
139152
- `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');
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';
@@ -2856,7 +2858,20 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
28562858
this.summaryService.clearSummaryCache(args);
28572859
});
28582860

2859-
this.transactions.onStateUpdate.pipe(destructor).subscribe(() => {
2861+
this.transactions.onStateUpdate.pipe(destructor).subscribe((event: StateUpdateEvent) => {
2862+
let actions = [];
2863+
if (event.origin === TransactionEventOrigin.REDO) {
2864+
actions = event.actions ? event.actions.filter(x => x.transaction.type === TransactionType.DELETE) : [];
2865+
} else if (event.origin === TransactionEventOrigin.UNDO) {
2866+
actions = event.actions ? event.actions.filter(x => x.transaction.type === TransactionType.ADD) : [];
2867+
}
2868+
if (actions.length > 0) {
2869+
for (const action of actions) {
2870+
if (this.selectionService.isRowSelected(action.transaction.id)) {
2871+
this.selectionService.deselectRow(action.transaction.id);
2872+
}
2873+
}
2874+
}
28602875
this.selectionService.clearHeaderCBState();
28612876
this.summaryService.clearSummaryCache();
28622877
this._pipeTrigger++;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</igx-grid-toolbar>
44

55
<div [style.flex-basis.px]='outerWidth' class="igx-grid__grouparea"
6-
*ngIf="groupingExpressions.length > 0 || hasGroupableColumns" #groupArea>
6+
*ngIf="showGroupArea && (groupingExpressions.length > 0 || hasGroupableColumns)" #groupArea>
77
<igx-chips-area (onReorder)="chipsOrderChanged($event)" (onMoveEnd)="chipsMovingEnded()">
88
<ng-container *ngFor="let expr of chipsGoupingExpressions; let last = last;">
99
<igx-chip [id]="expr.fieldName" [attr.title]="getGroupByChipTitle(expr)"

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export class IgxGridComponent extends IgxGridBaseDirective implements GridType,
111111
private _data;
112112
private _hideGroupedColumns = false;
113113
private _dropAreaMessage = null;
114+
private _showGroupArea = true;
114115

115116
/**
116117
* Gets/Sets the value of the `id` attribute.
@@ -699,6 +700,14 @@ export class IgxGridComponent extends IgxGridBaseDirective implements GridType,
699700
return this.columnList.some((col) => col.groupable && !col.columnGroup);
700701
}
701702

703+
@Input()
704+
public get showGroupArea(): boolean {
705+
return this._showGroupArea;
706+
}
707+
public set showGroupArea(value: boolean) {
708+
this._showGroupArea = value;
709+
}
710+
702711
private _setGroupColsVisibility(value) {
703712
if (this.columnList.length > 0 && !this.hasColumnLayouts) {
704713
this.groupingExpressions.forEach((expr) => {

0 commit comments

Comments
 (0)