Skip to content

Commit 2d34a38

Browse files
authored
Merge pull request #425 from jdcai/master
Add footer template
2 parents a5052cd + 7447554 commit 2d34a38

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/table/table.component.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import {
77
ViewChildren,
88
ElementRef,
99
AfterViewInit,
10-
HostListener
10+
HostListener,
11+
TemplateRef
1112
} from "@angular/core";
1213
import { Subscription, fromEvent } from "rxjs";
1314

@@ -386,6 +387,9 @@ import { I18n } from "./../i18n/i18n.module";
386387
</tbody>
387388
<ng-template #noDataTemplate><ng-content></ng-content></ng-template>
388389
<tfoot>
390+
<ng-template
391+
[ngTemplateOutlet]="footerTemplate">
392+
</ng-template>
389393
<tr *ngIf="this.model.isLoading">
390394
<td class="table_loading-indicator">
391395
<ibm-static-icon icon="loading_rows" size="lg"></ibm-static-icon>
@@ -640,6 +644,11 @@ export class Table implements AfterViewInit {
640644
*/
641645
@Input() stickyHeader = false;
642646

647+
/**
648+
* Set footer template to customize what is displayed in the tfoot section of the table
649+
*/
650+
@Input() footerTemplate: TemplateRef<any>;
651+
643652
/**
644653
* Emits an index of the column that wants to be sorted.
645654
*

0 commit comments

Comments
 (0)