Skip to content

Commit e98a3fc

Browse files
dkamburovChronosSFkdinev
authored
chore(grid): expose interfaces for the context of template guards (#12275)
* chore(grid): expose interfaces for the context of template guards * chore(*): Add changelog to the template context types * chore(grid): do not expose getCellByKey in grid interface * chore(grid): don't expose the grid types * chore(*): clean up leftover imports Co-authored-by: Stamen Stoychev <[email protected]> Co-authored-by: Konstantin Dinev <[email protected]>
1 parent 2ac452c commit e98a3fc

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ All notable changes for each version of this project will be documented in this
77
### New Features
88
- `igxGrid` - exposing new Input properties:
99

10+
- Parameters in grid templates now have types for their context. This can also cause issues if the app is in strict template mode and uses the wrong type. References to the template that may require conversion:
11+
* - `IgxColumnComponent` - `ColumnType` (for example the column parameter in `igxFilterCellTemplate`)
12+
* - `IgxGridCell` - `CellType` (for example the cell parameter in `igxCell` template)
13+
1014
- `excelStyleHeaderIconTemplate` - Gets/Sets the excel style header icon.
1115
- `groupRowTemplate` - Gets/Sets the template reference for the group row.
1216
- `headSelectorTemplate` - Gets/Sets the header row selector template.

projects/igniteui-angular/src/lib/grids/common/grid.interface.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ export interface ColumnType extends FieldType {
222222
getGridTemplate(isRow: boolean): string;
223223
toggleVisibility(value?: boolean): void;
224224
populateVisibleIndexes?(): void;
225+
pin(index?: number): boolean;
226+
unpin(index?: number): boolean;
225227
}
226228

227229
export interface IGridFormGroupCreatedEventArgs {

projects/igniteui-angular/src/lib/grids/public_api.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ export * from './grid-base.directive';
1313
export * from './grid.common';
1414
export * from './grid-public-row';
1515
export * from './grid-public-cell';
16-
export { CellType, RowType, IGX_GRID_BASE, ValidationStatus, IGridFormGroupCreatedEventArgs, IGridValidationState, IGridValidationStatusEventArgs, IRecordValidationState, IFieldValidationState } from './common/grid.interface';
16+
export {
17+
CellType, RowType, IGX_GRID_BASE, ValidationStatus, IGridFormGroupCreatedEventArgs, IGridValidationState, IGridValidationStatusEventArgs, IRecordValidationState, IFieldValidationState, ColumnType,
18+
IgxGridMasterDetailContext, IgxGroupByRowTemplateContext, IgxGridTemplateContext, IgxGridRowTemplateContext, IgxGridRowDragGhostContext, IgxGridEmptyTemplateContext, IgxGridRowEditTemplateContext,
19+
IgxGridRowEditTextTemplateContext, IgxGridRowEditActionsTemplateContext, IgxGridHeaderTemplateContext, IgxColumnTemplateContext, IgxCellTemplateContext, IgxGroupByRowSelectorTemplateContext,
20+
IgxHeadSelectorTemplateContext, IgxSummaryTemplateContext
21+
} from './common/grid.interface';
1722
export * from './summaries/grid-summary';
1823
export * from './grid-common.module';
1924
export * from './grid.rowEdit.directive';

0 commit comments

Comments
 (0)