Skip to content

Commit

Permalink
Fix search sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed May 4, 2023
1 parent 1dd7a38 commit 978cc69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/ItemFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
:selectedLabel="$t('multiselect.selectedLabel')"
:deselectLabel="$t('multiselect.deselectLabel')"
/>
<SortButtons v-if="sortTerm" class="mt-1" :value="sortOrder" enforce @input="sortDirectionSet" />
<SortButtons v-if="sortTerm && sortTerm.value" class="mt-1" :value="sortOrder" enforce @input="sortDirectionSet" />
</b-form-group>

<b-form-group :label="$t('search.itemsPerPage')" label-for="limit" :description="$t('search.itemsPerPageDescription', {maxItems})">
Expand Down Expand Up @@ -329,9 +329,9 @@ export default {
this.$set(this.query, 'ids', ids);
},
formatSort() {
if (this.sortTerm && this.sortOrder) {
if (this.sortTerm && this.sortTerm.value && this.sortOrder) {
let order = this.sortOrder < 0 ? '-' : '';
return `${order}${this.sortTerm}`;
return `${order}${this.sortTerm.value}`;
}
else {
return null;
Expand Down

0 comments on commit 978cc69

Please sign in to comment.