Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GroupBy row select emit event once, perf #10493

Merged
merged 3 commits into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ All notable changes for each version of this project will be documented in this
- Inputs `showToolbar`, `toolbarTitle`, `columnHiding`, `columnHidingTitle`, `hiddenColumnsText`,
`columnPinning`, `columnPinningTitle`, `pinnedColumnsText`.
Use `IgxGridToolbarComponent`, `IgxGridToolbarHidingComponent`, `IgxGridToolbarPinningComponent` instead.
- **Breaking Change** - The `rowSelected` event is renamed to `rowSelectionChanging` to better reflect its function
- `igxGrid`
- 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.
- `IgxColumnActionsComponent`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
"definedIn": [
"IgxComboBaseDirective"
]
},
{
"member": "rowSelected",
"replaceWith": "rowSelectionChanging",
"definedIn": [
"IgxGridComponent",
"IgxTreeGridComponent",
"IgxHierarchicalGridComponent",
"IgxRowIslandComponent"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "../../common/schema/binding.schema.json",
"changes": [
{
"name": "rowSelected",
"replaceWith": "rowSelectionChanging",
"owner": {
"selector": "igx-grid",
"type": "component"
}
},
{
"name": "rowSelected",
"replaceWith": "rowSelectionChanging",
"owner": {
"selector": "igx-tree-grid",
"type": "component"
}
},
{
"name": "rowSelected",
"replaceWith": "rowSelectionChanging",
"owner": {
"selector": "igx-hierarchical-grid",
"type": "component"
}
},
{
"name": "rowSelected",
"replaceWith": "rowSelectionChanging",
"owner": {
"selector": "igx-row-island",
"type": "component"
}
}
]
}
2 changes: 1 addition & 1 deletion projects/igniteui-angular/src/lib/grids/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ A list of the events emitted by the **igx-grid**:
|`columnMovingEnd`|Emitted when a column moving ends. Returns the source and target columns objects. This event is cancelable.|
|`columnMovingStart`|Emitted when a column moving starts. Returns the moved column object.|
|`selected`|Emitted when a cell is selected. Returns the cell object.|
|`rowSelected`|Emitted when a row selection has changed. Returns array with old and new selected rows' IDs and the target row, if available.|
|`rowSelectionChanging`|Emitted when row selection is changing. Returns array with old and new selected rows' IDs and the target row, if available.|
|`columnSelected`|Emitted when a column selection has changed. Returns array with old and new selected column' fields|
|`columnInit`|Emitted when the grid columns are initialized. Returns the column object.|
|`sortingDone`|Emitted when sorting is performed through the UI. Returns the sorting expression.|
Expand Down
8 changes: 4 additions & 4 deletions projects/igniteui-angular/src/lib/grids/common/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ export interface IColumnResizingEventArgs extends IColumnResizeEventArgs, Cancel
}

export interface IRowSelectionEventArgs extends CancelableEventArgs, IBaseEventArgs {
oldSelection: any[];
readonly oldSelection: any[];
newSelection: any[];
added: any[];
removed: any[];
event?: Event;
readonly added: any[];
readonly removed: any[];
readonly event?: Event;
}

export interface IColumnSelectionEventArgs extends CancelableEventArgs, IBaseEventArgs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,11 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
*
* @example
* ```html
* <igx-grid #grid (rowSelected)="onCellClickChange($event)" [data]="localData" [autoGenerate]="true"></igx-grid>
* <igx-grid #grid (rowSelectionChanging)="rowSelectionChanging($event)" [data]="localData" [autoGenerate]="true"></igx-grid>
* ```
*/
@Output()
public rowSelected = new EventEmitter<IRowSelectionEventArgs>();
public rowSelectionChanging = new EventEmitter<IRowSelectionEventArgs>();

/**
* Emitted when `IgxColumnComponent` is selected.
Expand Down
Loading