Fixed initial sort happening too soon
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@ztimson/ng-datatable", | ||||
|   "version": "1.6.5", | ||||
|   "version": "1.6.6", | ||||
|   "homepage": "https://github.com/ztimson/ng-datatable", | ||||
|   "license": "Apache-2.0", | ||||
|   "author": { | ||||
|   | ||||
| @@ -62,7 +62,7 @@ export class NgDatatableComponent implements OnInit { | ||||
|     this.clearSelected(); | ||||
|     this.processedData = this._data; | ||||
|     this.filters.forEach(f => this.processedData = this.processedData.filter(f)); | ||||
|     if(this.sortedColumn != null) { | ||||
|     if(this.sortedColumn != null && this.processedData) { | ||||
|       if (this.columns[this.sortedColumn].sortFn) { | ||||
|         this.processedData = this.processedData.sort(this.columns[this.sortedColumn].sortFn); | ||||
|       } else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user