Skip to content

Commit d14ff92

Browse files
committed
feat(cdk/table): add optional footer to cdk-text-column/mat-text-column
Added two new inputs to CdkTextColumn: `footerText` (string) and `footerTextTransform` (function), automatically inherited by MatTextColumn. If the table does not define a footer, the column footer will be ignored. Additionally, TextColumnOptions includes a new default function called `defaultFooterTextTransform`, used when neither `footerTextTransform` nor `footerText` are provided. Fixes #24532
1 parent 812a1fa commit d14ff92

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tools/public_api_guard/cdk/table.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,11 @@ export class CdkTextColumn<T> implements OnDestroy, OnInit {
412412
columnDef: CdkColumnDef;
413413
_createDefaultHeaderText(): string;
414414
dataAccessor: (data: T, name: string) => string;
415-
headerCell: CdkHeaderCellDef;
416-
headerText: string;
415+
footerCell: CdkFooterCellDef;
417416
footerText: string;
418417
footerTextTransform: (name: string) => string;
418+
headerCell: CdkHeaderCellDef;
419+
headerText: string;
419420
justify: 'start' | 'end' | 'center';
420421
get name(): string;
421422
set name(name: string);
@@ -426,7 +427,7 @@ export class CdkTextColumn<T> implements OnDestroy, OnInit {
426427
// (undocumented)
427428
ngOnInit(): void;
428429
// (undocumented)
429-
static ɵcmp: i0.ɵɵComponentDeclaration<CdkTextColumn<any>, "cdk-text-column", never, { "name": { "alias": "name"; "required": false; }; "headerText": { "alias": "headerText"; "required": false; }; "dataAccessor": { "alias": "dataAccessor"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; }, {}, never, never, true, never>;
430+
static ɵcmp: i0.ɵɵComponentDeclaration<CdkTextColumn<any>, "cdk-text-column", never, { "name": { "alias": "name"; "required": false; }; "headerText": { "alias": "headerText"; "required": false; }; "dataAccessor": { "alias": "dataAccessor"; "required": false; }; "footerText": { "alias": "footerText"; "required": false; }; "footerTextTransform": { "alias": "footerTextTransform"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; }, {}, never, never, true, never>;
430431
// (undocumented)
431432
static ɵfac: i0.ɵɵFactoryDeclaration<CdkTextColumn<any>, [{ optional: true; }, { optional: true; }]>;
432433
}
@@ -595,8 +596,8 @@ export const TEXT_COLUMN_OPTIONS: InjectionToken<TextColumnOptions<any>>;
595596
// @public
596597
export interface TextColumnOptions<T> {
597598
defaultDataAccessor?: (data: T, name: string) => string;
598-
defaultHeaderTextTransform?: (name: string) => string;
599599
defaultFooterTextTransform?: (name: string) => string;
600+
defaultHeaderTextTransform?: (name: string) => string;
600601
}
601602

602603
// (No @packageDocumentation comment for this package)

0 commit comments

Comments
 (0)