Skip to content

Commit

Permalink
feat(entity table): header can now be fixed (default)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbourget committed May 31, 2019
1 parent 7876328 commit 39bb60f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

<tr
mat-header-row
*matHeaderRowDef="headers;"
*matHeaderRowDef="headers; sticky: fixedHeader;"
[ngClass]="getHeaderClass()">
</tr>
<tr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ export class EntityTableComponent implements OnInit, OnDestroy, OnChanges {
*/
get selectMany(): boolean { return this.template.selectMany || false; }

/**
* Whether selection many entities should eb supported
* @internal
*/
get fixedHeader(): boolean { return this.template.fixedHeader === undefined ? true : this.template.fixedHeader; }

constructor(private cdRef: ChangeDetectorRef) {}

/**
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/lib/entity/shared/entity.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export interface EntityTableTemplate {
selectionCheckbox?: boolean;
selectMany?: boolean;
sort?: boolean;
fixedHeader?: boolean;
valueAccessor?: (entity: object, property: string) => any;
headerClassFunc?: () => {
[key: string]: boolean;
Expand Down

0 comments on commit 39bb60f

Please sign in to comment.