Skip to content

Commit 60e91f0

Browse files
authored
Merge pull request swimlane#275 from gerhardboer/sort-first-click
fix for first click sorting. It used the previous value for the sorts…
2 parents bbcbfd4 + ffe5f9a commit 60e91f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/datatable.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,10 @@ export class DatatableComponent implements OnInit, AfterViewInit {
459459

460460
if(column.comparator !== undefined) {
461461
if(typeof column.comparator === 'function') {
462-
column.comparator(this.rows, this.sorts);
462+
column.comparator(this.rows, sorts);
463463
}
464464
} else {
465-
this.rows = sortRows(this.rows, this.sorts);
465+
this.rows = sortRows(this.rows, sorts);
466466
}
467467

468468
this.sorts = sorts;

0 commit comments

Comments
 (0)