Skip to content

Commit a3b015b

Browse files
committed
fix(grids): dataChanged typing and public API export
1 parent e7bc5c4 commit a3b015b

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
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: 5 additions & 5 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';
@@ -1118,7 +1118,7 @@ export abstract class IgxGridBaseDirective implements GridType,
11181118
* ```
11191119
*/
11201120
@Output()
1121-
public dataChanging = new EventEmitter<IForOfDataChangingEventArgs>();
1121+
public dataChanging = new EventEmitter<IForOfDataChangeEventArgs>();
11221122

11231123
/**
11241124
* Emitted after the grid's data view is changed because of a data operation, rebinding, etc.
@@ -1129,7 +1129,7 @@ export abstract class IgxGridBaseDirective implements GridType,
11291129
* ```
11301130
*/
11311131
@Output()
1132-
public dataChanged = new EventEmitter<any>();
1132+
public dataChanged = new EventEmitter<IForOfDataChangeEventArgs>();
11331133

11341134

11351135
/**
@@ -3921,7 +3921,7 @@ export abstract class IgxGridBaseDirective implements GridType,
39213921
/**
39223922
* @hidden @internal
39233923
*/
3924-
public dataRebinding(event: IForOfDataChangingEventArgs) {
3924+
public dataRebinding(event: IForOfDataChangeEventArgs) {
39253925
if (event.state.chunkSize == 0) {
39263926
this._shouldRecalcRowHeight = true;
39273927
}
@@ -3931,7 +3931,7 @@ export abstract class IgxGridBaseDirective implements GridType,
39313931
/**
39323932
* @hidden @internal
39333933
*/
3934-
public dataRebound(event) {
3934+
public dataRebound(event: IForOfDataChangeEventArgs) {
39353935
this.selectionService.clearHeaderCBState();
39363936
if (this._shouldRecalcRowHeight) {
39373937
this._shouldRecalcRowHeight = false;

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)