Skip to content

Commit

Permalink
fix(table): change sorting direction (#1359)
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and GitHub Enterprise committed Oct 15, 2024
1 parent 3b7ea9e commit e67a600
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ export class TableSortingExampleComponent {
b: number | string | Date,
direction: SortDirection,
) {
return (a < b ? -1 : 1) * (direction === 'asc' ? 1 : -1);
if (a < b) {
return direction === 'asc' ? -1 : 1;
} else if (a > b) {
return direction === 'asc' ? 1 : -1;
}
return 0;
}
}

0 comments on commit e67a600

Please sign in to comment.