Skip to content

Commit

Permalink
fix sort order icon bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadim Ritter committed Jun 12, 2024
1 parent 8fc0e99 commit 8cbc8bb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions client/src/components/views/search/SearchPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
class="mr-2"
variant="text"
:ripple="false"
@click="isSearchDescending = !isSearchDescending">
@click="changeSortOrder()">
Date
<template v-slot:prepend>
<v-icon size="x-large" :icon="isSearchDescending ? 'mdi-chevron-down' : 'mdi-chevron-up'"></v-icon>
Expand Down Expand Up @@ -162,10 +162,6 @@
closeAllPanelsDisabled.value = false;
});
watch(isSearchDescending, () => {
sessionsDays.value.reverse();
});
async function searchSessions(
examName: string,
groupName: string,
Expand Down Expand Up @@ -224,6 +220,7 @@
loginNameIpToggleListFillUp();
searchResultAvailable.value = true;
isSearchDescending.value = true;
}
function loginNameIpToggleListFillUp(){
Expand All @@ -241,6 +238,11 @@
}
}
function changeSortOrder(){
isSearchDescending.value = !isSearchDescending.value;
sessionsDays.value.reverse();
}
function closeAllPanels(){
sessionPanels.value = [];
}
Expand Down

0 comments on commit 8cbc8bb

Please sign in to comment.