Skip to content

Commit

Permalink
fix: add sorting to collection list (#3171)
Browse files Browse the repository at this point in the history
* fix: add sorting to collection list

* fix: added better comparisons
  • Loading branch information
MaxPostema authored Dec 22, 2023
1 parent 0b56b7c commit e7478d1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions apps/directory/src/views/BiobankReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,17 @@ export default {
return this.biobankDataAvailable &&
this.biobank.collections &&
this.biobank.collections.length
? this.biobank.collections
.filter((it) => !it.parent_collection)
.map((col) => getCollectionDetails(col))
? this.detailedChildCollections
: [];
},
detailedChildCollections() {
return this.biobank.collections
.filter((it) => !it.parent_collection)
.map((col) => getCollectionDetails(col))
.sort((a, b) =>
a.name.localeCompare(b.name, "en", { sensitivity: "base" })
);
},
networks() {
return this.biobankDataAvailable && this.biobank.network
? mapNetworkInfo(this.biobank)
Expand Down

0 comments on commit e7478d1

Please sign in to comment.