2017-06-29 10:23:56 -07:00
|
|
|
/**
|
|
|
|
|
* @license
|
2017-10-06 14:31:05 -04:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2017-06-29 10:23:56 -07:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
|
*/
|
|
|
|
|
|
2017-07-25 16:15:24 -07:00
|
|
|
import {CDK_TABLE_TEMPLATE, CdkTable} from '@angular/cdk/table';
|
2018-08-21 20:33:55 +02:00
|
|
|
import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';
|
|
|
|
|
|
2017-06-29 10:23:56 -07:00
|
|
|
/**
|
|
|
|
|
* Wrapper for the CdkTable with Material design styles.
|
|
|
|
|
*/
|
|
|
|
|
@Component({
|
|
|
|
|
moduleId: module.id,
|
2018-03-30 07:29:19 -07:00
|
|
|
selector: 'mat-table, table[mat-table]',
|
2017-10-04 23:52:52 +02:00
|
|
|
exportAs: 'matTable',
|
2017-06-29 10:23:56 -07:00
|
|
|
template: CDK_TABLE_TEMPLATE,
|
|
|
|
|
styleUrls: ['table.css'],
|
|
|
|
|
host: {
|
|
|
|
|
'class': 'mat-table',
|
|
|
|
|
},
|
|
|
|
|
encapsulation: ViewEncapsulation.None,
|
|
|
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
|
|
|
})
|
2018-10-23 22:48:03 +02:00
|
|
|
export class MatTable<T> extends CdkTable<T> {
|
2018-06-06 22:37:14 -07:00
|
|
|
/** Overrides the sticky CSS class set by the `CdkTable`. */
|
|
|
|
|
protected stickyCssClass = 'mat-table-sticky';
|
2018-04-25 09:57:57 -07:00
|
|
|
}
|
2018-10-23 22:48:03 +02:00
|
|
|
|
|
|
|
|
// TODO(devversion): workaround for https://github.com/angular/material2/issues/12760
|
|
|
|
|
(MatTable as any)['ctorParameters'] = () => (CdkTable as any)['ctorParameters'];
|