Skip to content

Commit

Permalink
Sort largest gene count first in slim tables
Browse files Browse the repository at this point in the history
Refs #2246
  • Loading branch information
kimrutherford committed Nov 1, 2024
1 parent f4be71f commit 30cbdcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class GeneResultsSlimTableComponent implements OnInit {
this.resultTable.sort(sortRows);
} else {
const sortRowsByCount =
(a: ProcessedRow, b: ProcessedRow) => a.geneUniquenames.length - b.geneUniquenames.length;
(a: ProcessedRow, b: ProcessedRow) => b.geneUniquenames.length - a.geneUniquenames.length;
this.resultTable.sort(sortRowsByCount);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/slim-table/slim-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class SlimTableComponent implements OnInit {
if (this.sortColumnName == 'name') {
this.slimSubsetElements.sort((a, b) => a.name.localeCompare(b.name));
} else {
this.slimSubsetElements.sort((a, b) => a.gene_count - b.gene_count);
this.slimSubsetElements.sort((a, b) => b.gene_count - a.gene_count);
}
}

Expand Down

0 comments on commit 30cbdcc

Please sign in to comment.