Skip to content

Commit

Permalink
fix(sorting): bug was allowing to sort columns even when they're set …
Browse files Browse the repository at this point in the history
…to 'false' (#155)
  • Loading branch information
Nimmard authored and valorkin committed May 30, 2016
1 parent 3bf815b commit 9621f91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/table/ng-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class NgTableComponent {

public onChangeTable(column:any):void {
this._columns.forEach((col:any) => {
if (col.name !== column.name) {
if (col.name !== column.name && col.sort !== false) {
col.sort = '';
}
});
Expand Down
2 changes: 1 addition & 1 deletion demo/components/table/table-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class TableDemoComponent implements OnInit {
let sort:string = void 0;

for (let i = 0; i < columns.length; i++) {
if (columns[i].sort !== '') {
if (columns[i].sort !== '' && columns[i].sort !== false) {
columnName = columns[i].name;
sort = columns[i].sort;
}
Expand Down

0 comments on commit 9621f91

Please sign in to comment.