Skip to content

Commit d380ced

Browse files
authored
refactor(grid): rename columnSelected to columnSelectionChanging (#10505)
1 parent 17d772a commit d380ced

File tree

13 files changed

+111
-68
lines changed

13 files changed

+111
-68
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ 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
76+
- **Breaking Change** - The `rowSelected` event is renamed to `rowSelectionChanging` to better reflect its function.
77+
- **Breaking Change** - The `columnSelected` event is renamed to `columnSelectionChanging` to better reflect its function.
7778
- `igxGrid`
7879
- 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.
7980
- `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
@@ -31,6 +31,16 @@
3131
"IgxHierarchicalGridComponent",
3232
"IgxRowIslandComponent"
3333
]
34+
},
35+
{
36+
"member": "columnSelected",
37+
"replaceWith": "columnSelectionChanging",
38+
"definedIn": [
39+
"IgxGridComponent",
40+
"IgxTreeGridComponent",
41+
"IgxHierarchicalGridComponent",
42+
"IgxRowIslandComponent"
43+
]
3444
}
3545
]
3646
}

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,38 @@
3232
"selector": "igx-row-island",
3333
"type": "component"
3434
}
35+
},
36+
{
37+
"name": "columnSelected",
38+
"replaceWith": "columnSelectionChanging",
39+
"owner": {
40+
"selector": "igx-grid",
41+
"type": "component"
42+
}
43+
},
44+
{
45+
"name": "columnSelected",
46+
"replaceWith": "columnSelectionChanging",
47+
"owner": {
48+
"selector": "igx-tree-grid",
49+
"type": "component"
50+
}
51+
},
52+
{
53+
"name": "columnSelected",
54+
"replaceWith": "columnSelectionChanging",
55+
"owner": {
56+
"selector": "igx-hierarchical-grid",
57+
"type": "component"
58+
}
59+
},
60+
{
61+
"name": "columnSelected",
62+
"replaceWith": "columnSelectionChanging",
63+
"owner": {
64+
"selector": "igx-row-island",
65+
"type": "component"
66+
}
3567
}
3668
]
3769
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ A list of the events emitted by the **igx-grid**:
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.|
231231
|`rowSelectionChanging`|Emitted when row selection is changing. Returns array with old and new selected rows' IDs and the target row, if available.|
232-
|`columnSelected`|Emitted when a column selection has changed. Returns array with old and new selected column' fields|
232+
|`columnSelectionChanging`|Emitted when a column selection is changing. 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.|
235235
|`filteringDone`|Emitted when filtering is performed through the UI. Returns the filtering expressions tree of the column for which the filtering was performed.|

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ export interface IRowSelectionEventArgs extends CancelableEventArgs, IBaseEventA
9191
}
9292

9393
export interface IColumnSelectionEventArgs extends CancelableEventArgs, IBaseEventArgs {
94-
oldSelection: string[];
94+
readonly oldSelection: string[];
9595
newSelection: string[];
96-
added: string[];
97-
removed: string[];
98-
event?: Event;
96+
readonly added: string[];
97+
readonly removed: string[];
98+
readonly event?: Event;
9999
}
100100

101101
export interface ISearchInfo {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,11 +476,11 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
476476
*
477477
* @example
478478
* ```html
479-
* <igx-grid #grid (columnSelected)="columnSelected($event)" [data]="localData" [autoGenerate]="true"></igx-grid>
479+
* <igx-grid #grid (columnSelectionChanging)="columnSelectionChanging($event)" [data]="localData" [autoGenerate]="true"></igx-grid>
480480
* ```
481481
*/
482482
@Output()
483-
public columnSelected = new EventEmitter<IColumnSelectionEventArgs>();
483+
public columnSelectionChanging = new EventEmitter<IColumnSelectionEventArgs>();
484484

485485
/**
486486
* Emitted before `IgxColumnComponent` is pinned.

0 commit comments

Comments
 (0)