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