Skip to content

Commit

Permalink
Merge pull request #131 from fhstp/feature_sort_connectables_alpha
Browse files Browse the repository at this point in the history
sort contect in connectionlist form by name alphabethically #110
  • Loading branch information
alex-rind authored Aug 14, 2023
2 parents 176792e + 4e4527d commit 911c592
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/components/AlteriConnectionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,20 @@ export default defineComponent({
// lists of alters are sorted in same order as in the main list
const altersConnected = computed(() => {
return store.state.nwk.alteri.filter((d) =>
connectedAlterIds.value.includes(d.id)
);
return store.state.nwk.alteri
.filter((d) => connectedAlterIds.value.includes(d.id))
.sort((a, b) => a.name.localeCompare(b.name));
});
const altersNotConnected = computed(() => {
return store.state.nwk.alteri.filter(
(d) =>
!connectedAlterIds.value.includes(d.id) &&
d.id != props.alter.id &&
isConnectable(d)
);
return store.state.nwk.alteri
.filter(
(d) =>
!connectedAlterIds.value.includes(d.id) &&
d.id != props.alter.id &&
isConnectable(d)
)
.sort((a, b) => a.name.localeCompare(b.name));
});
onMounted(() => {
Expand Down

0 comments on commit 911c592

Please sign in to comment.