Skip to content

Commit

Permalink
feat(cdk/table): allow text column to be centered (#24133)
Browse files Browse the repository at this point in the history
Allows for the text inside a text column to be centered.

Fixes #23920.
  • Loading branch information
crisbeto authored Mar 3, 2022
1 parent 723a821 commit 508b7ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cdk/table/text-column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class CdkTextColumn<T> implements OnDestroy, OnInit {
@Input() dataAccessor: (data: T, name: string) => string;

/** Alignment of the cell values. */
@Input() justify: 'start' | 'end' = 'start';
@Input() justify: 'start' | 'end' | 'center' = 'start';

/** @docs-private */
@ViewChild(CdkColumnDef, {static: true}) columnDef: CdkColumnDef;
Expand Down
2 changes: 1 addition & 1 deletion tools/public_api_guard/cdk/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export class CdkTextColumn<T> implements OnDestroy, OnInit {
dataAccessor: (data: T, name: string) => string;
headerCell: CdkHeaderCellDef;
headerText: string;
justify: 'start' | 'end';
justify: 'start' | 'end' | 'center';
get name(): string;
set name(name: string);
// (undocumented)
Expand Down

0 comments on commit 508b7ac

Please sign in to comment.