Skip to content

Commit 461f2e9

Browse files
authored
Merge pull request #10493 from IgniteUI/dpetev/groupby-row-select-perf-event
GroupBy row select emit event once, perf
2 parents 59b9af5 + 3fba870 commit 461f2e9

23 files changed

+248
-157
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ All notable changes for each version of this project will be documented in this
7373
- Inputs `showToolbar`, `toolbarTitle`, `columnHiding`, `columnHidingTitle`, `hiddenColumnsText`,
7474
`columnPinning`, `columnPinningTitle`, `pinnedColumnsText`.
7575
Use `IgxGridToolbarComponent`, `IgxGridToolbarHidingComponent`, `IgxGridToolbarPinningComponent` instead.
76+
- **Breaking Change** - The `rowSelected` event is renamed to `rowSelectionChanging` to better reflect its function
7677
- `igxGrid`
7778
- Exposed a `groupStrategy` input that functions similarly to `sortStrategy`, allowing customization of the grouping behavior of the grid. Please, refer to the [Group By ](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/groupby) topic for more information.
7879
- `IgxColumnActionsComponent`

projects/igniteui-angular/migrations/update-13_0_0/changes/members.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@
2121
"definedIn": [
2222
"IgxComboBaseDirective"
2323
]
24+
},
25+
{
26+
"member": "rowSelected",
27+
"replaceWith": "rowSelectionChanging",
28+
"definedIn": [
29+
"IgxGridComponent",
30+
"IgxTreeGridComponent",
31+
"IgxHierarchicalGridComponent",
32+
"IgxRowIslandComponent"
33+
]
2434
}
2535
]
2636
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "../../common/schema/binding.schema.json",
3+
"changes": [
4+
{
5+
"name": "rowSelected",
6+
"replaceWith": "rowSelectionChanging",
7+
"owner": {
8+
"selector": "igx-grid",
9+
"type": "component"
10+
}
11+
},
12+
{
13+
"name": "rowSelected",
14+
"replaceWith": "rowSelectionChanging",
15+
"owner": {
16+
"selector": "igx-tree-grid",
17+
"type": "component"
18+
}
19+
},
20+
{
21+
"name": "rowSelected",
22+
"replaceWith": "rowSelectionChanging",
23+
"owner": {
24+
"selector": "igx-hierarchical-grid",
25+
"type": "component"
26+
}
27+
},
28+
{
29+
"name": "rowSelected",
30+
"replaceWith": "rowSelectionChanging",
31+
"owner": {
32+
"selector": "igx-row-island",
33+
"type": "component"
34+
}
35+
}
36+
]
37+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ A list of the events emitted by the **igx-grid**:
228228
|`columnMovingEnd`|Emitted when a column moving ends. Returns the source and target columns objects. This event is cancelable.|
229229
|`columnMovingStart`|Emitted when a column moving starts. Returns the moved column object.|
230230
|`selected`|Emitted when a cell is selected. Returns the cell object.|
231-
|`rowSelected`|Emitted when a row selection has changed. Returns array with old and new selected rows' IDs and the target row, if available.|
231+
|`rowSelectionChanging`|Emitted when row selection is changing. Returns array with old and new selected rows' IDs and the target row, if available.|
232232
|`columnSelected`|Emitted when a column selection has changed. Returns array with old and new selected column' fields|
233233
|`columnInit`|Emitted when the grid columns are initialized. Returns the column object.|
234234
|`sortingDone`|Emitted when sorting is performed through the UI. Returns the sorting expression.|

projects/igniteui-angular/src/lib/grids/common/events.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ export interface IColumnResizingEventArgs extends IColumnResizeEventArgs, Cancel
8383
}
8484

8585
export interface IRowSelectionEventArgs extends CancelableEventArgs, IBaseEventArgs {
86-
oldSelection: any[];
86+
readonly oldSelection: any[];
8787
newSelection: any[];
88-
added: any[];
89-
removed: any[];
90-
event?: Event;
88+
readonly added: any[];
89+
readonly removed: any[];
90+
readonly event?: Event;
9191
}
9292

9393
export interface IColumnSelectionEventArgs extends CancelableEventArgs, IBaseEventArgs {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,11 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
465465
*
466466
* @example
467467
* ```html
468-
* <igx-grid #grid (rowSelected)="onCellClickChange($event)" [data]="localData" [autoGenerate]="true"></igx-grid>
468+
* <igx-grid #grid (rowSelectionChanging)="rowSelectionChanging($event)" [data]="localData" [autoGenerate]="true"></igx-grid>
469469
* ```
470470
*/
471471
@Output()
472-
public rowSelected = new EventEmitter<IRowSelectionEventArgs>();
472+
public rowSelectionChanging = new EventEmitter<IRowSelectionEventArgs>();
473473

474474
/**
475475
* Emitted when `IgxColumnComponent` is selected.

0 commit comments

Comments
 (0)