HalitTalha / ng-material-extensions

Extended features for @angular/material components
Apache License 2.0
101 stars 52 forks source link

Not Export Some columns like action columns where i have a button edit,add, etc... #24

Closed CedLP closed 5 years ago

CedLP commented 5 years ago

Hello, can i have a possibility to export a datatable without a some colomuns like actions colums? If yes how can i do this please?

Thanks

HalitTalha commented 5 years ago

You can hide the columns you want with their column index.

For example hiding the columns at 0 and 3 index: <mat-table matTableExporter [dataSource]="dataSource" #exporter="matTableExporter" [hiddenColumns]="[0,3]"></mat-table>

You can also check the stackblitz demo: https://stackblitz.com/edit/mte-demo