Skip to content

1.8.0

Compare
Choose a tag to compare
@ssuperczynski ssuperczynski released this 16 Nov 17:19
· 663 commits to master since this release
4b965d9
  • row details

If you have more details than row can handle, you can put them into row details, and toggle when needed.

app.component.html

<ngx-table
  [configuration]="configuration"
  [data]="data"
  [columns]="columns"
  [detailsTemplate]="detailsTemplateRef"
  [pagination]="pagination">
</ngx-table>
<ng-template #detailsTemplate let-row>
  <div>
    <h2 class="color-green">{{row.company }}</h2>
    {{row.firstname }} {{row.lastname}}
    <hr>
    <span class="fa fa-address-card-o" aria-hidden="true"> </span> {{row.created | date}}
  </div>
</ng-template>

app.component.ts

export class AppComponent implements OnInit {
  @ViewChild('detailsTemplate') detailsTemplateRef: TemplateRef<any>;
}