This repository was archived by the owner on Jan 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ export const HEADER_TEMPLATE = `
10
10
(click)="columnSelectorOpen = !columnSelectorOpen; $event.stopPropagation()" >
11
11
<i class="fa fa-list fa-lg"></i>
12
12
</button>
13
+ <button *ngIf="dataTable.showDownloadButton" type="button" class="btn btn-default btn-sm download-button"
14
+ (click)="dataTable.downloadItems()">
15
+ <i class="fa fa-download fa-lg"></i>
16
+ </button>
13
17
<div class="column-selector-wrapper" (click)="$event.stopPropagation()">
14
18
<div *ngIf="columnSelectorOpen" class="column-selector-box panel panel-default">
15
19
<div *ngIf="dataTable.expandableRows" class="column-selector-fixed-column checkbox">
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ export class DataTable implements DataTableParams, OnInit {
56
56
@Input ( ) selectOnRowClick = false ;
57
57
@Input ( ) autoReload = true ;
58
58
@Input ( ) showReloading = false ;
59
+ @Input ( ) showDownloadButton = false ;
59
60
60
61
// UI state without input:
61
62
@@ -207,6 +208,13 @@ export class DataTable implements DataTableParams, OnInit {
207
208
} ) ;
208
209
}
209
210
211
+ // Download
212
+ @Output ( ) download = new EventEmitter ( ) ;
213
+
214
+ downloadItems ( ) {
215
+ this . download . emit ( this . _getRemoteParameters ( ) ) ;
216
+ }
217
+
210
218
// event handlers:
211
219
212
220
@Output ( ) rowClick = new EventEmitter ( ) ;
You can’t perform that action at this time.
0 commit comments