Skip to content

Commit

Permalink
Fix sorting example in Table demo
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkudrna authored and mbohal committed Aug 2, 2023
1 parent b8ca3ce commit 8b21b1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ React.createElement(() => {
sortedItems.sort((a, b) => b[key] - a[key]);
} else if (key === 'name') {
sortedItems.sort((a, b) => {
if (a.name < b.name) {
if (a.name > b.name) {
return -1;
}
if (a.name > b.name) {
if (a.name < b.name) {
return 1;
}
return 0;
Expand Down

0 comments on commit 8b21b1b

Please sign in to comment.