Skip to content

Commit d9df427

Browse files
authored
Merge pull request #15824 from IgniteUI/dpetev/analyzer-updates-19.2
Analyzer updates and grid dataChanged typing adjust
2 parents d21fdb6 + 36d1992 commit d9df427

File tree

4 files changed

+27
-13
lines changed

4 files changed

+27
-13
lines changed

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export class IgxForOfDirective<T, U extends T[] = T[]> extends IgxForOfToken<T,U
225225
* ```
226226
*/
227227
@Output()
228-
public dataChanged = new EventEmitter<any>();
228+
public dataChanged = new EventEmitter<IForOfDataChangeEventArgs>();
229229

230230
@Output()
231231
public beforeViewDestroyed = new EventEmitter<EmbeddedViewRef<any>>();
@@ -1512,11 +1512,16 @@ export interface IForOfState extends IBaseEventArgs {
15121512
chunkSize?: number;
15131513
}
15141514

1515+
/**
1516+
* @deprecated in 19.2.7. Use `IForOfDataChangeEventArgs` instead.
1517+
*/
15151518
export interface IForOfDataChangingEventArgs extends IBaseEventArgs {
15161519
containerSize: number;
15171520
state: IForOfState;
15181521
}
15191522

1523+
export interface IForOfDataChangeEventArgs extends IForOfDataChangingEventArgs {}
1524+
15201525
export class IgxGridForOfContext<T, U extends T[] = T[]> extends IgxForOfContext<T, U> {
15211526
constructor(
15221527
$implicit: T,
@@ -1585,7 +1590,7 @@ export class IgxGridForOfDirective<T, U extends T[] = T[]> extends IgxForOfDirec
15851590
* An event that is emitted after data has been changed but before the view is refreshed
15861591
*/
15871592
@Output()
1588-
public dataChanging = new EventEmitter<IForOfDataChangingEventArgs>();
1593+
public dataChanging = new EventEmitter<IForOfDataChangeEventArgs>();
15891594

15901595
constructor(
15911596
_viewContainer: ViewContainerRef,

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { cloneArray, mergeObjects, compareMaps, resolveNestedPath, isObject, Pla
4040
import { GridColumnDataType } from '../data-operations/data-util';
4141
import { FilteringLogic } from '../data-operations/filtering-expression.interface';
4242
import { IGroupByRecord } from '../data-operations/groupby-record.interface';
43-
import { IForOfDataChangingEventArgs, IgxGridForOfDirective } from '../directives/for-of/for_of.directive';
43+
import { IForOfDataChangeEventArgs, IgxGridForOfDirective } from '../directives/for-of/for_of.directive';
4444
import { IgxTextHighlightService } from '../directives/text-highlight/text-highlight.service';
4545
import { ISummaryExpression } from './summaries/grid-summary';
4646
import { IgxGridBodyDirective, RowEditPositionStrategy } from './grid.common';
@@ -993,6 +993,7 @@ export abstract class IgxGridBaseDirective implements GridType,
993993
@Output()
994994
public gridCopy = new EventEmitter<IGridClipboardEvent>();
995995

996+
/* blazorCSSuppress */
996997
/**
997998
* Emitted when the rows are expanded or collapsed.
998999
*
@@ -1117,7 +1118,7 @@ export abstract class IgxGridBaseDirective implements GridType,
11171118
* ```
11181119
*/
11191120
@Output()
1120-
public dataChanging = new EventEmitter<IForOfDataChangingEventArgs>();
1121+
public dataChanging = new EventEmitter<IForOfDataChangeEventArgs>();
11211122

11221123
/**
11231124
* Emitted after the grid's data view is changed because of a data operation, rebinding, etc.
@@ -1128,7 +1129,7 @@ export abstract class IgxGridBaseDirective implements GridType,
11281129
* ```
11291130
*/
11301131
@Output()
1131-
public dataChanged = new EventEmitter<any>();
1132+
public dataChanged = new EventEmitter<IForOfDataChangeEventArgs>();
11321133

11331134

11341135
/**
@@ -3920,7 +3921,7 @@ export abstract class IgxGridBaseDirective implements GridType,
39203921
/**
39213922
* @hidden @internal
39223923
*/
3923-
public dataRebinding(event: IForOfDataChangingEventArgs) {
3924+
public dataRebinding(event: IForOfDataChangeEventArgs) {
39243925
if (event.state.chunkSize == 0) {
39253926
this._shouldRecalcRowHeight = true;
39263927
}
@@ -3930,7 +3931,7 @@ export abstract class IgxGridBaseDirective implements GridType,
39303931
/**
39313932
* @hidden @internal
39323933
*/
3933-
public dataRebound(event) {
3934+
public dataRebound(event: IForOfDataChangeEventArgs) {
39343935
this.selectionService.clearHeaderCBState();
39353936
if (this._shouldRecalcRowHeight) {
39363937
this._shouldRecalcRowHeight = false;
@@ -4194,7 +4195,7 @@ export abstract class IgxGridBaseDirective implements GridType,
41944195
col.toggleVisibility(args.newValue);
41954196
}
41964197

4197-
/* blazorSuppress */
4198+
/* blazorCSSuppress */
41984199
/**
41994200
* Gets/Sets a list of key-value pairs [row ID, expansion state].
42004201
*
@@ -4212,7 +4213,7 @@ export abstract class IgxGridBaseDirective implements GridType,
42124213
return this._expansionStates;
42134214
}
42144215

4215-
/* blazorSuppress */
4216+
/* blazorCSSuppress */
42164217
public set expansionStates(value) {
42174218
this._expansionStates = new Map<any, boolean>(value);
42184219
this.expansionStatesChange.emit(this._expansionStates);

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
574574
return this._defaultExpandState;
575575
}
576576

577+
/* blazorSuppress */
577578
/**
578579
* Gets/Sets the schema for the hierarchical grid.
579580
* This schema defines the structure and properties of the data displayed in the grid.
@@ -592,6 +593,7 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
592593
this._hGridSchema = entities;
593594
}
594595

596+
/* blazorSuppress */
595597
public get schema() {
596598
if (!this._hGridSchema) {
597599
this._hGridSchema = this.generateSchema();
@@ -1233,8 +1235,8 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
12331235

12341236
private generateSchema() {
12351237
const filterableFields = this.columns.filter((column) => !column.columnGroup && column.filterable);
1236-
let entities: EntityType[];
1237-
1238+
let entities: EntityType[];
1239+
12381240
if(filterableFields.length !== 0) {
12391241
entities = [
12401242
{
@@ -1292,7 +1294,7 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
12921294

12931295
if (rowIslandChildEntities?.length > 0) {
12941296
childEntities = rowIslandChildEntities;
1295-
}
1297+
}
12961298

12971299
return {
12981300
name: entityName,

projects/igniteui-angular/src/public_api.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ export * from './lib/directives/filter/filter.directive';
2020
export * from './lib/directives/focus/focus.directive';
2121
export * from './lib/directives/focus-trap/focus-trap.directive';
2222
export {
23-
IgxForOfContext, IgxForOfDirective, IForOfState, IgxGridForOfContext, IgxGridForOfDirective
23+
IForOfDataChangeEventArgs,
24+
IForOfDataChangingEventArgs,
25+
IForOfState,
26+
IgxForOfContext,
27+
IgxForOfDirective,
28+
IgxGridForOfContext,
29+
IgxGridForOfDirective,
2430
} from './lib/directives/for-of/for_of.directive';
2531
export * from './lib/directives/button/icon-button.directive';
2632
export * from './lib/directives/layout/layout.directive';

0 commit comments

Comments
 (0)