Skip to content

Commit

Permalink
fix: set first sort to descending
Browse files Browse the repository at this point in the history
  • Loading branch information
mxposed committed Mar 9, 2023
1 parent 839f405 commit 3d18eeb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ export class Column {
}

sort() {
if (this.sortState === "asc") {
this.sortState = "desc";
return d3.descending;
if (this.sortState === "desc") {
this.sortState = "asc";
return d3.ascending;
}
this.sortState = "asc";
return d3.ascending;
this.sortState = "desc";
return d3.descending;
}
}

Expand Down

0 comments on commit 3d18eeb

Please sign in to comment.