Skip to content

Commit

Permalink
refactor(cdk/table): expose data source type (#24782)
Browse files Browse the repository at this point in the history
Exposes the `CdkTableDataSourceInput` type since it can be useful for people implementing their own tables.

Fixes #24518.

(cherry picked from commit e3825c8)
  • Loading branch information
crisbeto authored and zarend committed Apr 19, 2022
1 parent ab04f21 commit 0a06523
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/cdk/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ export interface RowOutlet {
viewContainer: ViewContainerRef;
}

/**
* Union of the types that can be set as the data source for a `CdkTable`.
* @docs-private
*/
type CdkTableDataSourceInput<T> = readonly T[] | DataSource<T> | Observable<readonly T[]>;
/** Possible types that can be set as the data source for a `CdkTable`. */
export type CdkTableDataSourceInput<T> = readonly T[] | DataSource<T> | Observable<readonly T[]>;

/**
* Provides a handle for the table to grab the view container's ng-container to insert data rows.
Expand Down
3 changes: 3 additions & 0 deletions tools/public_api_guard/cdk/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ export class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDes
static ɵfac: i0.ɵɵFactoryDeclaration<CdkTable<any>, [null, null, null, { attribute: "role"; }, { optional: true; }, null, null, null, null, null, { optional: true; skipSelf: true; }, { optional: true; }]>;
}

// @public
export type CdkTableDataSourceInput<T> = readonly T[] | DataSource<T> | Observable<readonly T[]>;

// @public (undocumented)
export class CdkTableModule {
// (undocumented)
Expand Down

0 comments on commit 0a06523

Please sign in to comment.