Added events to tie into beginning/ending of processing

This commit is contained in:
2018-06-28 19:22:01 -04:00
parent 7ee1eda2f0
commit da9e3960e2
2 changed files with 7 additions and 1 deletions

View File

@ -22,7 +22,9 @@ export class NgDatatableComponent implements OnInit {
// Outputs ===========================================================================================================
@Output() filterChanged = new EventEmitter<any[]>(); // Output when filters change
@Output() finished = new EventEmitter<any[]>(); // Fired after processing is finished
@Output() pageChanged = new EventEmitter<number>(); // Output when page is changed
@Output() processing = new EventEmitter<any[]>(); // Fires when grid begins to process
@Output() selectionChanged = new EventEmitter<any[]>(); // Output when selected rows changes
// Properties ========================================================================================================
@ -59,6 +61,7 @@ export class NgDatatableComponent implements OnInit {
// Helpers ===========================================================================================================
private _process() {
this.processing.emit(this.processedData);
this.clearSelected();
this.processedData = this._data;
this.filters.forEach(f => this.processedData = this.processedData.filter(f));
@ -83,6 +86,7 @@ export class NgDatatableComponent implements OnInit {
} else {
this.pagedData = this.processedData;
}
this.finished.emit(this.processedData);
}
_convertWidth(width) {