Skip to content

Commit

Permalink
fix(sorting): it does not allow multiple columns to sort (fixes #40)
Browse files Browse the repository at this point in the history
Fix sorting algorithm function in demo application.
  • Loading branch information
jdelgadoalfonso authored and valorkin committed Apr 11, 2016
1 parent b7de4ad commit 47256a6
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 119 deletions.
6 changes: 5 additions & 1 deletion components/table/ng-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ export class NgTable {
}

onChangeTable(column:any) {
this.columns = [column];
this._columns.forEach((col) => {
if (col.name != column.name) {
col.sort = '';
}
});
this.tableChanged.emit({sorting: this.configColumns});
}

Expand Down
Loading

0 comments on commit 47256a6

Please sign in to comment.