Title Template
Implementing a Title Template
It is possible to add a custom template for the table title by using #goTableTitle
.
The content within these areas can be any HTML and is supported by Angular so you can make use of components, pipes, etc.
If a table title template is used, it will replace the normal table title area.
<go-table [tableConfig]="tableConfig">
<ng-template #goTableTitle>
<h4
class="go-heading-4 go-heading--no-margin"
style="padding: 1rem;">
Example Title Template
</h4>
<go-icon-button
buttonIcon="save_alt"
(handleClick)="makeToast()">
</go-icon-button>
</ng-template>
<go-table-column field="id" title="ID"></go-table-column>
<go-table-column field="name.first" title="First Name"></go-table-column>
<go-table-column field="name.last" title="Last Name"></go-table-column>
<go-table-column field="email" title="Email"></go-table-column>
<go-table-column field="gender" title="Gender"></go-table-column>
<go-table-column field="ip_address" title="IP Address"></go-table-column>
</go-table>
Example Title Template
ID | First Name | Last Name | Email | Gender | IP Address |
---|---|---|---|---|---|
1 | Perry | Ritchie | Katarina.Skiles@yahoo.com | Female | 79.100.211.61 |
2 | Bert | Rosenbaum | Della52@yahoo.com | Male | 13.167.30.169 |
3 | Vinnie | Rowe | Arianna48@hotmail.com | Male | 123.101.5.60 |
4 | Garrett | Schulist | Georgette_West@hotmail.com | Female | 103.229.162.147 |
5 | Caleigh | Reilly | Anya.Feeney35@yahoo.com | Male | 42.194.22.63 |